how to add cliet side event to server side?
and
how to register client script to sever side? wt difference
these two

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain asp.net application life cycle?

773


If you have an application with multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers by using round-robbin load balancing. Explain which is the best approach to maintain login-in state for the users?

817


How would you get asp.net running in apache web servers? Explain it's limitations.

766


What is a 404 redirect?

830


What is the difference between GridView and Repeater controls in ASP.NET?

817


Define asp.net caching?

787


Can you explain autopostback?

750


Which object wraps the state or data of a user?

771


How to communicate via Remote proxy with Client? a)MarshalByRef b)Marshal by Value or Any thing else?

1806


What is difference between URL and URI?

850


Whta are the Various steps taken to optimize a web based application (caching, stored procedure etc.) ?

799


To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?

833


Explain file-based dependency and key-based dependency.

786


What is bound controls

797


Explain the Order of events in an asp.net page?

801