How to Open any web page by clicking any Any ASPControl
like (Checkbox,radio button or Button) without calling its
event and without going to Siverside code?
Answer Posted / om sambosankara
In Asp.net for most of the Controls have OnClick property
will be available in (.net 2.0/VSS 2005) by using the
Onclick property at the ClientSide we can open the Webpage
without going to Sever
OnClick Event: This is a property is available for Dropdown
list ,TextBox,CheckBox,RadioButton,Button,LinkButton etc..)
by using this property when ever the user click the Control
this property will be called.This all operations are done at
the Client Side
only
<asp:button id="btn"
onclick="window.open('Default.aspx?bck=1','cal','width=250,height=150,left=225,top=125')"
text="CLICK" runat="server" CssClass="href"
"></asp:button>
(or)
<script language="javascript">
function fnopenpage()
{
window.open('Default.aspx?bck=1');
return true
}
</script>
<asp:button id="btn" onclick="return fnopenpage();"
text="CLICK" runat="server" CssClass="href"
"></asp:button>
bck=1 after the page is not mandatory its a qury string if
requried we can pass any qurystrings like that....
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What is the use of the tag in the web.config file?
What is datagrid asp.net?
Tell me what is the request flow used for asp.net mvc framework? : asp.net mvc
What is recordset asp?
What is asp.net response object?
How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?
What is autopostback true?
How can exception be handled with out the use of try catch?
What is distributed system in asp.net?
What are tuples?
What is viewstate? In which event of the page life cycle, is the viewstate available?
What is the procedure to handle the process request using mhpm events fired? : asp.net mvc
How to comment out asp.net tags?
Is asp.net and .net same?
By default, Web API sends HTTP response with which of the following status code for all uncaught exception?