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 the use of placeholder control?

754


What I need to create and run an asp.net application?

725


How many types of cookies are available in asp?

796


witch is the best insistute in sharpoint course.what abt future of share point course.

2971


What is the difference between session and application?

719


A Web Service Can Only Be Written In .net. Is it True??

825


what is loosely coupled solution? How it can be used?

779


Differentiate between early binding and late binding.

785


Explain swagger components.

755


What is custom attribute?

750


Is a dll file an executable?

728


What is odata in web api?

785


Is it possible to apply themes to an asp.net application? If yes, then how?

794


what is DLL Hell and how it is solved in .NET? please explain clearly??

2108


What is the difference between response.redirect and server.transfer?

747