I am trying to redirect another site on button click.
Answers were Sorted based on User's Feedback
Answer / sunil kumar singh
Response.Redirect("http://yahoo.com");
| Is This Answer Correct ? | 10 Yes | 1 No |
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 |
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 |
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 |
Answer / usha
Response.Redirect("link name");
http://www.interview-questions.maxmice.com
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
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 |
What are sharepoint pages?
What are the main components of the ADO object model? How are they used?
2 Answers HCL, Syntax Softtech,
Contrast OOP and SOA. What are tenets of each ?
Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?
Create the Output by mearging 2 tables and taking common column sid from both you should not use database create table and data in it Randomly table 1 sid sname saddress 1 sa ampt 2 na hyd 3 ha hyd table 2 sid dno dname 1 12 stats 2 23 phy 3 12 stats OutPUt sid sname saddress did dname 1 sa ampt 12 stats 2 na hyd 23 phy 3 ha hyd 12 stats
In try catch blocks one is normal catch block and another is sqlcatchexception block
How many types of web application ?
How to remove themes from certain controls?
What is difference between ASP and ASP.NET ?
Difference between web user control and web custom control?
What's the ASP.Net Application life cycle?
Windows Authentication (via Active Directory) and SQL Server authentication (via Microsoft SQL Server username and passwords). Which one is trusted and which one is untrusted?
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)