Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Handling a Click Event
Message
 
 
To
22/11/2003 02:39:36
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00852578
Message ID:
00852613
Views:
8
>James,
>
>You can't call a server side function from client-side javascript, and you can't call a client-side javascript function from the server. The reason is that all of the server side execution happens _before_ the HTML is sent to the browser.
>
>If you assign the OnClick attribute of an HTML or asp element, the server-side click event is not raised.
>
>What you can do is add your script code to the Response stream during the postback so that it is executed when the HTML is sent to the browser. You can do this with Response.Write or Page.RegisterClientStartupScript.

OK Its kinda what i thought for the state of things. So this line works fine.
e.Item.Attributes.Add("ondblclick", "Javascript:__doPostBack('myDblClick','" & e.Item.ItemIndex & "');")

two more newbie questions.
Is the "__EVENTARGUMENT" only a string or can it be the aurgument object?
e.Item.Attributes.Add("ondblclick", "Javascript:__doPostBack( e );")

I am not familiar with "Page.RegisterClientStartupScript" where can I find info on this?

thanks in advance.
- jim durkin

"The universe is a big place, perhaps the biggest." Kurt Vonnegut
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform