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?

Answers were Sorted based on User's Feedback



How to Open any web page by clicking any Any ASPControl like (Checkbox,radio button or Button) wit..

Answer / 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

How to Open any web page by clicking any Any ASPControl like (Checkbox,radio button or Button) wit..

Answer / ramkumar

using postbackurl property we can easily redirect to a page

eg:

<asp:button ID="btnRedirect" PostBackUrl="newuser.aspx"
Text="CLICK" runat="server"></asp:button>

Is This Answer Correct ?    4 Yes 3 No

How to Open any web page by clicking any Any ASPControl like (Checkbox,radio button or Button) wit..

Answer / jayashri

All code is correct only for buttons not for radio
button...Then what is yhe coding for radio button for go to
the next page???????????

Is This Answer Correct ?    1 Yes 0 No

How to Open any web page by clicking any Any ASPControl like (Checkbox,radio button or Button) wit..

Answer / ratnesh

should be OnClientClick in case Of Button..

Is This Answer Correct ?    3 Yes 3 No

How to Open any web page by clicking any Any ASPControl like (Checkbox,radio button or Button) wit..

Answer / vikas kant

<script type="text/javascript" language="javascript">
function fnopenpage()
{
window.open('Default2.aspx?bck=1');
return true
}
</script>

<asp:button ID="btn" OnClientClick="fnopenpage()"
Text="CLICK" runat="server"></asp:button>

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More ASP.NET Interview Questions

What is intrinsic objects in asp.net?

0 Answers  


what is the difference between sql 2000 and 2005?

2 Answers   Cognizant,


How Can assign alias name for ASP.NET Web API Action?

0 Answers  


How can we identify that the page is post back in asp net?

0 Answers  


How can we inherit a static member?

0 Answers  






How can I create master page in asp net?

0 Answers  


What are the navigation ways between pages available in ASP.NET?

0 Answers   Winsol Solutions,


what is client-server architecture in .net? and what is 3-tier architecture?

1 Answers  


What is the difference between ASP.NET Webforms and ASP.NET MVC?

0 Answers  


What are the Types of object in asp

0 Answers   BirlaSoft,


How to you can limit Access to Web API to Specific HTTP Verb?

0 Answers  


Is viewstate enabled by default?

0 Answers  


Categories