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 to magage the state manament in asp.net with respect to in_prock and out_prock

1 Answers   Aviva,


Give some salient points of difference between request processor and request dispatcher.

0 Answers   Tech Mahindra,


How do you a replicate a set of controls across a number of ASP Pages

2 Answers  


What is the purpose of App_Code folder in ASP.NET? Why we this?

0 Answers   Sans Pareil IT Services,


What are Master Pages in ASP.NET? or What is a Master Page?

0 Answers   MCN Solutions,


What is asp net application object?

0 Answers  


Where the viewstate is stored after the page postback?

0 Answers  


What is xaml? Are xaml file compiled or built on runtime?

0 Answers  


How to disable disable browser's Back button in asp.net (JavaScript)?

0 Answers   HCL,


What is asp.net web application?

0 Answers  


What are validators and list some validators of asp.net?

0 Answers  


I have a textbox , assign required field validator and i have two buttons 1) save 2) cancel , i want the validator run only when i click save button, don't validate cancel button , what to do?

7 Answers   eMids, Infotech, Integra, TCS, Wipro,


Categories