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


Please Help Members By Posting Answers For Below Questions

What are the cookies types in asp.net?

570


What is enableviewstate?

553


What is asp net_sessionid?

647


What is the usage of DelegatingHandler?

599


What is http post and http get?

554






Can you use Web API with ASP.NET Web Form?

706


Mention few asp.net validators.

585


What events will occur when a page is loaded?

589


How to prepare culture-specific formatting in .net.

525


Is asp net front end or backend?

536


Mention the namespace that is used to include .net data provider for sql server in .net code?

513


What are session and cookies?

544


Error : The operation couldn’t be performed because ole db provider sqlncli10 for linked server was unable to begin a distributed transaction.00000110 oledb provider for linked server returned message the partner transaction manager has disabled its support for remote/network transactions. I can able to execute the stored procedure in sql server but when i run the web page getting error like above. I did all the configuration. what is the solution?

1916


What is difference between session and cookie?

531


What is the usie of activex control in .net?

568