|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to write a server events for 'Document' object of a ASP.NET page?If there have a page which have unknown '<div>' label or may be no any
controls. I want add 'onclick' events to call server event to do something. But there are no any events of 'Document' object on properties windows under VS IDE. How should I to do? <div id="div_1" onclick="div_clicked();"> <input type="hidden"
id="hid_clickedctlname" runat="server"> include a javascript block... <script language="javascript"> function div_clicked() { document.getElementById("hid_clickedctlname").value = "div_1"; form.submit(); } </script> Now on the codebehind, you can check this.IsPostBack and the hid_clickedctlname.Value to see if the div is clicked... Show quoteHide quote "ABC" <a**@abc.com> ¼¶¼g©ó¶l¥ó·s»D:eCXxAbLGGHA.3***@TK2MSFTNGP10.phx.gbl... > If there have a page which have unknown '<div>' label or may be no any > controls. I want add 'onclick' events to call server event to do > something. But there are no any events of 'Document' object on properties > windows under VS IDE. How should I to do? >
Other interesting topics
Is this static method threadsafe?
Advantages of Static Vs Instance methods? Use validationSummary to display error message in user control Compiler Error: [No relevant source lines] output cache question PLS HELP: Simple adding data to db in ASP.NET 2.0 CompareValidator for dates > than today Prerender changes get lost after Page.RenderControl VWD 2005 Express: "copy web site" creates multiple publishform (2.0) Trap the Maximum request length |
|||||||||||||||||||||||