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 is cache in asp net?

0 Answers  


Disable Session State at the Page Level

1 Answers  


I am having four text boxes in my web application. I am setting Required Field validator to each Text box. And I am having two buttons in my application. If i clicked the first button only first two text box validation will get fire. Dont show error message for remaining two text box. If i clicked second button last two text box validation will get fired. It will not consider the first two validation controls. That is how to enable and disable the validation controls.

4 Answers  


What is an axd file?

0 Answers  


Explain http handlers? Where we can use the http handlers?

0 Answers   Accenture,


Can action method static?

0 Answers  


What is server redirect?

0 Answers  


Explain what is event bubbling?

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  


What are the difference between function and stored procedure in .net programming language?

0 Answers  


Is post back in asp.net?

0 Answers  


Types of session management in ASP.NET?

1 Answers   Microsoft,


Categories