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 |
Why asp.net mvc is better than asp.net? : Asp.Net MVC
Can we set master page as a start page?
if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.
Explain the difference between Repeater and Data list control in ASP.NET?
How to authenticate users using Web.Config ?
What are sql joins?
Is viewstate secure?
Name the tools or API for developing or testing web api?
What is Serilazation? how many type of serilazation are their?
How ASP and ASP.NET page works? Explain about asp.net page life cycle?
Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution?
please can any describe 'Master Page' in ASP.Net 2.0