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

What is http protocol and how it works?

525


What is the procedure to create the environment for asp.net? : asp.net mvc

512


List the advantages and disadvantages of user control an custom control?

534


What are the different types of validation controls in asp.net?

516


What is the maximum timeout we can set for Cookies?

547






Please brief not about xsd,xslt & xml?

542


What is cache in asp net?

527


Where is the view state data stored in asp net?

557


Explain login control and form authentication.

557


What is asp.net ajax?

550


Will the asp.net validators run in server side or client side? How do you do client-side validation in .net? How to disable validator control by client side javascript?

520


Mention the execution process for managed code?

535


What is variable and constant in .net programming language?

392


How many types of sessions in asp.net?

575


How do u optimize a query in asp.net?

561