473,394 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Is any way to palce a control(button/label) at a location on webPagein runtime??

Hi,
Is any way to palce a control(button/label) at a location on webPage
in runtime??

In page_load envet I am adding a button on the page in the contol
collection of a panel but not able to specify the location of the
button since button controls did not have location property in web.

I am trying to place a control at mouse click position on the
page.also I am not getting the mouse down position on the page I am
working on that.Actually I am windows Programmer and all those things
are done in windows very smoothly.
Let me know if any solution!!

Cheers,
Chandan Kumar
Nov 30 '07 #1
3 1527
After serious thinking chandan wrote :
Hi,
Is any way to palce a control(button/label) at a location on webPage
in runtime??

In page_load envet I am adding a button on the page in the contol
collection of a panel but not able to specify the location of the
button since button controls did not have location property in web.

I am trying to place a control at mouse click position on the
page.also I am not getting the mouse down position on the page I am
working on that.Actually I am windows Programmer and all those things
are done in windows very smoothly.
Let me know if any solution!!

Cheers,
Chandan Kumar
Web applications are very different from windows apps (as you found
out).
There is no direct interaction between the codebehind and the form, as
they are living on different machines: codebehind runs on the server
and the form "runs" on the client's browser.
Control alternates between the two: when the server is done, it spits
out HTML text. This is received by the browser and rendered into a
screen. When the user clicks a button, an HTTP request (or "POST") is
sent back to the server. The browser then waits until the server sends
a new HTML response.

You will never get the server to react to mouse-events in the browser:
the delay would be too much.

With additional coding in javascript and the use of Ajax technologies
you could get a somewhat smoother response, but not the same as in a
windows application.

Hans Kesting
Nov 30 '07 #2
On Nov 30, 5:46 pm, Hans Kesting <invalid.han...@spamgourmet.com>
wrote:
After serious thinking chandan wrote :


Hi,
Is any way to palce a control(button/label) at a location on webPage
in runtime??
In page_load envet I am adding a button on the page in the contol
collection of a panel but not able to specify the location of the
button since button controls did not have location property in web.
I am trying to place a control at mouse click position on the
page.also I am not getting the mouse down position on the page I am
working on that.Actually I am windows Programmer and all those things
are done in windows very smoothly.
Let me know if any solution!!
Cheers,
Chandan Kumar

Web applications are very different from windows apps (as you found
out).
There is no direct interaction between the codebehind and the form, as
they are living on different machines: codebehind runs on the server
and the form "runs" on the client's browser.
Control alternates between the two: when the server is done, it spits
out HTML text. This is received by the browser and rendered into a
screen. When the user clicks a button, an HTTP request (or "POST") is
sent back to the server. The browser then waits until the server sends
a new HTML response.

You will never get the server to react to mouse-events in the browser:
the delay would be too much.

With additional coding in javascript and the use of Ajax technologies
you could get a somewhat smoother response, but not the same as in a
windows application.

Hans Kesting- Hide quoted text -

- Show quoted text -
Thanks Hans for giving this knowledge. Actually I think this problem
in windows mode.Now suppose I have a panel on the page and then can I
palce some control on panel at runtime as I think there is click
envetn on panel.I am trying to do this if you have some clue then send
me.

Actually I am workig on a charting application and I have to place
annotation on the chart at run time.

Thanks,
Chandan kumar
Dec 6 '07 #3
Hi,

Well, to place some annotation in runtime inside a Web-Browser it will
require lots, and lots of code (preferably) in javascript. Specially
if you're wiling to serve different platforms (i.e. Browsers)

Only browser scripts can respond to mouse events, and event so the
code needs to be short for there would be a huge impact on performarce
if the code in mouse events are too long.

You need to realize that the browser environment is very, very
different than desktop app.

You don't have any control whatsoever on what it will be displayed on
the user's box.

Yes, you can do wonders with javascript and css, but the user can
override every single item and then your beautiful app may crash
soundly.

Developing for web, specially targeting different platforms, is very
tricky.

Regards,

Paulo Santos
http://pjondevelopment.50webs.com

On Dec 6, 3:32 am, chandan <ck.kis...@gmail.comwrote:
On Nov 30, 5:46 pm, Hans Kesting <invalid.han...@spamgourmet.com>
wrote:


After serious thinking chandan wrote :
Hi,
Is any way to palce a control(button/label) at a location on webPage
in runtime??
In page_load envet I am adding a button on the page in the contol
collection of a panel but not able to specify the location of the
button since button controls did not have location property in web.
I am trying to place a control at mouse click position on the
page.also I am not getting the mouse down position on the page I am
working on that.Actually I am windows Programmer and all those things
are done in windows very smoothly.
Let me know if any solution!!
Cheers,
Chandan Kumar
Web applications are very different from windows apps (as you found
out).
There is no direct interaction between the codebehind and the form, as
they are living on different machines: codebehind runs on the server
and the form "runs" on the client's browser.
Control alternates between the two: when the server is done, it spits
out HTML text. This is received by the browser and rendered into a
screen. When the user clicks a button, an HTTP request (or "POST") is
sent back to the server. The browser then waits until the server sends
a new HTML response.
You will never get the server to react to mouse-events in the browser:
the delay would be too much.
With additional coding in javascript and the use of Ajax technologies
you could get a somewhat smoother response, but not the same as in a
windows application.
Hans Kesting- Hide quoted text -
- Show quoted text -

Thanks Hans for giving this knowledge. Actually I think this problem
in windows mode.Now suppose I have a panel on the page and then can I
palce some control on panel at runtime as I think there is click
envetn on panel.I am trying to do this if you have some clue then send
me.

Actually I am workig on a charting application and I have to place
annotation on the chart at run time.

Thanks,
Chandan kumar- Hide quoted text -

- Show quoted text -
Dec 6 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark | last post by:
How do you reference the caption of the label attached to a control on a form by first referencing the form? For example, textbox named Addr1 has an attached label with the caption "Address1"....
2
by: uv | last post by:
Hi! I'm having problems submitting a new record through the form. I'm working with the wizard and I've added a control button to my form for entering entering a new record but for some reason it...
1
by: Qadir | last post by:
Hello What would be C# code for setting up control location property Thank you,
2
by: Matt Tapia | last post by:
I have a user control that I have placed an html control button. I want to dynamically create a javascript window.open action with certain query string properties (why it needs to be dynamic) to...
0
by: jphelan | last post by:
After opening and clicking on the popup calendar command control button, "fdlgCal"; I click on a given date. The date is suppose to then appear in a date field next to the control. Instead, I get...
0
by: raylopez99 | last post by:
I was dynamically creating some controls (buttons) at runtime, and I had to uniquely identify each control button created. I ended up using GetHash() function, which is fine, but I'm wondering if...
1
by: Manoj Mittal | last post by:
I have created the Dynamic control in asp.net c# like for (int i = 1; i <= 5; i++) { Label label = new Label(); label.ID = "Label" + i; label.Text = "Label"+i; form1.Controls.Add(label); }
0
by: ghickey | last post by:
I'm having problems with a windows form application that I am developing using C#.Net 2003. My application's layout gets altered when I transfer projects between the following two machines. ...
2
by: migrant_lad | last post by:
form to view in pivot table view is based on query. form default view is pivot table and will function when the form is opened directly. The problem is that when the form is opened from a control...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.