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

C

chandan

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
 
H

Hans Kesting

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
 
C

chandan

After serious thinking chandan wrote :










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
 
P

PJ on Development

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top