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...


I am trying to redirect another site on button click.

Answers were Sorted based on User's Feedback



I am trying to redirect another site on button click...

Answer / sunil kumar singh

Response.Redirect("http://yahoo.com");

Is This Answer Correct ?    10 Yes 1 No

I am trying to redirect another site on button click...

Answer / guest

You can also use PostbackUrl property associated with
button control in ASP.NET,
such as : <asp:button id = "b1" PostBackUrl = "www.sify.com"
runat = "server" Text = "redirect"/>

Is This Answer Correct ?    4 Yes 0 No

I am trying to redirect another site on button click...

Answer / anju

Hi Anjani, there is a mistake in answer is that the link button control doesn't contain the NavigateUrl property but we do this task by doing this in the linkbutton control source view is:

<asp:LinkButton ID="lnkbtn" runat="server" OnClick="lnkbtn_Click" OnCommand="link"><a href="http://www.google.com">Link</a></asp:LinkButton>
</div>

Is This Answer Correct ?    4 Yes 1 No

I am trying to redirect another site on button click...

Answer / anjani

you can use the link button control in that control there is a property c/d NavigateUrl in which u specify either the URL of any site or any page of the application...

Is This Answer Correct ?    1 Yes 0 No

I am trying to redirect another site on button click...

Answer / usha

Response.Redirect("link name");

http://www.interview-questions.maxmice.com

Is This Answer Correct ?    1 Yes 0 No

I am trying to redirect another site on button click...

Answer / gopakumar

There is a mistake in answer is that the link button
control doesn't contain the NavigateUrl property but we do
this task by doing this in the linkbutton control source
view is:

<asp:LinkButton ID="lnkbtn" runat="server"
OnClick="lnkbtn_Click"><a
href="http://www.google.com">Link</a></asp:LinkButton>
</div>

The OnCommand="link" is not needed.

<asp:LinkButton ID="lnkbtn" OnClick="lnkbtn_Click"
runat="server" >
<a href="http://www.google.com">Link</a>
</asp:LinkButton>

Is This Answer Correct ?    1 Yes 0 No

I am trying to redirect another site on button click...

Answer / kiran

responce.redirect(http//:gmail.com)

Is This Answer Correct ?    1 Yes 1 No

I am trying to redirect another site on button click...

Answer / richard des jardins

Assign the OnClick property of the Button the the Method
that will handle the OnClick Event" OnClick
= "MyButton_Click" for C#. Alternatively for VB.NET ue the
Handles Keyword on the Method lie this :
Protected Sub MyButton_Click(ByVal Sender As Onbject, ByVal
e S EventArgs) Handles MyButton.Click
C#;
Protected Void MyButton_Click(Object sender, EventArgs e).

Inside the method handle the event:

Response.Redirect("")
Response.Transfer("",false)

This way, you can perform any other tasks you may want to
do such as writing to an event log, or updated a database
record before redirecting the user.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More ASP.NET Interview Questions

What is the difference between appsetting and connectionstring tags in web.config file

2 Answers   HCL, TCS,


What is a url string?

0 Answers  


What are the components of ado.net?

0 Answers  


What is a server cookie?

0 Answers  


What does the following SQL statement return, assuming that all tables and column names are correct? SELECT FirstName, StreetAddress FROM Employees JOIN AddressBook ON Employees.EmpID = AddressBook.EmpID a) Nothing, the JOIN syntax is wrong. b) All the records form the Employees table, and only the matching ones form the StreetAddress table. c) All the records from the StreetAddress table and only the matching records form the Employees table. d) Only the matching records from the two tables.

4 Answers   Syntax Softtech,


What are session and cookies?

0 Answers  


Is overloading possible in web services?

3 Answers   Microsoft,


How is a session stored and maintained in asp.net?

0 Answers  


By default, Web API sends HTTP response with which of the following status code for all uncaught exception?

0 Answers  


What is ashx file in asp.net?

0 Answers  


Every Validation controls have same option ?

2 Answers   iGate,


What is view state and how this can be done and was this there in asp?

11 Answers   Accenture, KDOT, Mphasis,


Categories