Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



how to add cliet side event to server side? and how to register client script to sever side? wt di..

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

how to add cliet side event to server side? and how to register client script to sever side? wt di..

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

how to add cliet side event to server side? and how to register client script to sever side? wt di..

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

Post New Answer

More ASP.NET Interview Questions

Is session stored in browser?

0 Answers  


I am trying to implement sorting facility from client side code in GridView Control. So how can I fill up an Array inside client side code (using JavaScript), i want to assign my DataSet object declared and filled up on Server side(in code behind) to the array (on client side)

0 Answers   HCL,


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

0 Answers  


Explain how does asp page work?

0 Answers  


About web methods and its various attributes ?

1 Answers   Digital GlobalSoft,


Why do I get error message "could not load type" whenever I browse to my asp.net web site?

0 Answers  


Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

0 Answers   Siebel,


How do cookies work?

0 Answers  


Why do we use web config?

0 Answers  


Where session id is stored?

0 Answers  


What is localization and Globalization?

3 Answers  


Explain the asp.net mvc folder conventions? : asp.net mvc

0 Answers  


Categories