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
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 |
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 |
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 |
what to magage the state manament in asp.net with respect to in_prock and out_prock
Give some salient points of difference between request processor and request dispatcher.
How do you a replicate a set of controls across a number of ASP Pages
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?
What is asp net application object?
Where the viewstate is stored after the page postback?
What is xaml? Are xaml file compiled or built on runtime?
How to disable disable browser's Back button in asp.net (JavaScript)?
What is asp.net web application?
What are validators and list some validators of asp.net?
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,
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)