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

What are the different ways you would consider sending data across pages in ASP (i.e between asp to asp)?

0 Answers  


Explain page output caching?

0 Answers  


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?

0 Answers  


6. Tell us about a time when you failed to meet a deadline. What were the repercussions?

0 Answers   AlKhaleej, Swatz Oils,


What is asp.net web application?

0 Answers  


Explain the main differences between asp and asp.net?

0 Answers  


What is viewstate? What does the "enableviewstate” property do? Whay would I want it on or off?

0 Answers  


Explain weak typing and strong typing.

0 Answers  


What is different between webconfig.xml & Machineconfig.xml ?

1 Answers  


What are different methods of session maintenance in asp.net?

0 Answers  


Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

0 Answers  


When using the Pager object, inorder to know which page to go, which property you have to set to grid?

0 Answers   Siebel,


Categories