how to add cliet side event to server side?
and
how to register client script to sever side? wt difference
these two
Answers were Sorted based on User's Feedback
Answer / yogesh sharma
ClientScript.RegisterStartupScript(Me.GetType
(), "script", "<script language=""javascript"">function1(){}
</script>")
and
ClientScript.RegisterClientScriptBlock(Me.GetType
(),"script","<script language='javascript'>function1(){}
</script>
above two methods use to add client side event to server
side.
Difference between above two is that
ClientScript.RegisterStartupScript will insert script
before closing </form> tag.
and
ClientScript.RegisterClientScriptBlock will insert script
after form start tag <form runat=server > of the page.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / jagadish
string popupScript = "<script language='javascript'>" +
"window.open'PopUp.aspx', 'CustomPopUp', " +"'width=200,
height=200, menubar=yes, resizable=no')" +"</script>";
Page.RegisterStartupScript("PopupScript", popupScript);
OR
Page.RegisterStartupScript(me.gettype(),"somename","<script
language=javascript>somefunction()</script");
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / raju
we can register client script in serverside also....if u
want to make it in serverside use this code...
ClientScript.RegisterStartupScript(Me.GetType
(), "script", "<script language=""javascript"">function1()
</script>")
(or)
Me.Page.RegisterClientScriptBlock("close", "<script
language=javascript>javascriptcode......</script>")
I think there is no difference b/n those two....depending
upon the situatio we can use any of these....
Is This Answer Correct ? | 0 Yes | 0 No |
What is a viewstate?
Describe session handling in a webfarm, how does it work and what are the limits?
About session modes
In the Repeater control which way you can edit?
Does asp.net still recognize the global.asa file?
What is SOAP, UDDI and WSDL ?
2 Answers Infosys, Network, TCS, Wipro,
how we deploy the asp.net 2.0 application
what is the MSIL assembler do?
Apart from IDE what are the enhancements in asp.net 2.0?
What are server-side comments in ASP.NET?
Explain the concept of View Model in MVC?
Why should i prefer JSP over asp.net or any other web development language..??