Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
chandan - 30 Nov 2007 06:51 GMT
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
Hans Kesting - 30 Nov 2007 12:46 GMT
After serious thinking chandan wrote :
> Hi,
> Is any way to palce a control(button/label) at a location on webPage
[quoted text clipped - 13 lines]
> 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
chandan - 06 Dec 2007 05:32 GMT
On Nov 30, 5:46 pm, Hans Kesting <invalid.han...@spamgourmet.com>
wrote:
> After serious thinking chandan wrote :
>
[quoted text clipped - 37 lines]
>
> - 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
PJ on Development - 06 Dec 2007 10:43 GMT
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 Nov 30, 5:46 pm, Hans Kesting <invalid.han...@spamgourmet.com>
> wrote:
[quoted text clipped - 54 lines]
>
> - Show quoted text -

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.