•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 361,560 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,014 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 729 | Replies: 14
![]() |
•
•
Join Date: Jun 2007
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
I am trying to open another page from an image. I can open the page on a different window by doing this: onclick="Response.Redirect(cci_info\cci\features\create_CCI\WebForm1.aspx);"
But I don't want to open another window, rather I need the image button to open a page in the same window.
Thanks for the help.
But I don't want to open another window, rather I need the image button to open a page in the same window.
Thanks for the help.
ASP Syntax (Toggle Plain Text)
<asp:image imageurl="~/common/images/demos/header-buildsummary.png" width="125" height="34" alternatetext="CCI Form" runat="server" cssclass="site" id="cciform" onmouseover="this.src='common/images/demos/header-cciform-hover.png';" onmouseout="this.src='common/images/demos/header-cciform.png';" onclick="Response.Redirect(cci_info\cci\features\create_CCI\WebForm1.aspx);" title="Test - CCI"TabIndex="1"/>
Last edited by peter_budo : May 24th, 2008 at 7:14 pm. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,120
Reputation:
Rep Power: 3
Solved Threads: 46
You want the image button to open the page in the same window (i.e. without launching a new IE browser?)?
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Jun 2007
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
You want the image button to open the page in the same window (i.e. without launching a new IE browser?)?
I messed up on the problem detail. I was able to open up another form but in a new window by doing this:
onclick="window.open('WebForm/UCOSQA','_blank');"
But I just want to open the form on the same window. The above window.open will open another window.
Last edited by peter_budo : May 24th, 2008 at 7:15 pm. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,120
Reputation:
Rep Power: 3
Solved Threads: 46
asp Syntax (Toggle Plain Text)
onclick="Response.Redirect(pagetogoto.aspx);"
Should do the trick. If not let me know and post your code. Hope that helps!
Last edited by majestic0110 : May 21st, 2008 at 3:37 pm.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Jun 2007
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
asp Syntax (Toggle Plain Text)
onclick="Response.Redirect(pagetogoto.aspx);"
Should do the trick. If not let me know and post your code. Hope that helps!
I tried that but got no response from clicking.
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,120
Reputation:
Rep Power: 3
Solved Threads: 46
•
•
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,120
Reputation:
Rep Power: 3
Solved Threads: 46
Actually, create an event handler for the image (by double clicking it in Visual studio) then in the event handler try this:
Or for Visual Basic
This should fix it. Hope this helps!
c# Syntax (Toggle Plain Text)
Response.Redirect("pagetogoto.aspx");
Or for Visual Basic
vb Syntax (Toggle Plain Text)
Response.Redirect("pagetogoto.aspx")
This should fix it. Hope this helps!
Last edited by majestic0110 : May 21st, 2008 at 4:21 pm.
If you have a quality, be proud of it and let it define you. Add it to the world!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
If you got your answer, please mark the thread as Solved. It saves time when people are looking to contribute threads or for answers!
•
•
Join Date: Jun 2007
Posts: 13
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
Actually, create an event handler for the image (by double clicking it in Visual studio) then in the event handler try this:
c# Syntax (Toggle Plain Text)
Response.Redirect("pagetogoto.aspx");
Or for Visual Basic
vb Syntax (Toggle Plain Text)
Response.Redirect("pagetogoto.aspx")
This should fix it. Hope this helps!
ASP Syntax (Toggle Plain Text)
<%@ Page Language ="C#"%> <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head id="Head1" runat="server"> <title>UCOSQA - Home</title> <link href="common/css/rotator.css" type="text/css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="common/css/demos.css" /> <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="common/css/ie6-demos.css" /><![endif]--> </head> <body> <form id="form1" runat="server"> <!-- Body Container --> <div id="body-container"> <!-- Header Container --> <div id="header-container"> <!-- Header Navigation --> <div id="header"> <asp:image imageurl="~/common/images/demos/header-logo.png" width="121" height="34" alternatetext="ComponentArt" runat="server" cssclass="logo" id="ca_logo" /> <asp:image imageurl="~/common/images/demos/header-divider.png" width="35" height="34" alternatetext="|" runat="server" cssclass="divider" id="divider" /> <asp:image imageurl="~/common/images/demos/header-title.png" width="188" height="34" alternatetext="Web.UI 2007.1 Live Demos" runat="server" cssclass="demo-title" id="demo_title" /> <asp:image imageurl="~/common/images/navigation/separator.png" width="353px" height="34px" alternatetext=" " runat="server" cssclass="separator" id="separator" /> <asp:image imageurl="~/common/images/demos/header-buildsummary.png" width="125" height="34" alternatetext="UCOS QA - Build Summary" runat="server" cssclass="site" id="buildsummary" onmouseover="this.src='common/images/demos/header-buildsummary-hover.png';" onmouseout="this.src='common/images/demos/header-buildsummary.png';" onclick="window.open('WebForm/UCOSQA','_blank');" title="UCOSQA - Build Summary" /> <asp:image imageurl="~/common/images/demos/header-cciform.png" width="125" height="34" alternatetext="CCI Form" runat="server" cssclass="site" id="cciform" onmouseover="this.src='common/images/demos/header-cciform-hover.png';" onmouseout="this.src='common/images/demos/header-cciform.png';" onclick="Response.Redirect(copyofdefault.aspx);" title="UCOSQA - CCI Form" TabIndex="1"/> </div>
Last edited by peter_budo : May 24th, 2008 at 7:15 pm. Reason: Keep It Organized - please use [code] tags
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
age amd avatar blue gene chips database dell development dos drivers economy energy enterprise firefox graphics hardware ibm ibm. news intel intel ibm internet it linux memory microsoft mozilla news open open source open-source opengl openoffice ps3 recession red hat russia software source sun super supercomputer supercomputing system technology trends ubuntu vista windows working x86
- Button to open a new browser window (ASP.NET)
- Open Excel Sheet in Vb.net (VB.NET)
- Anyone good with Favlets? window links? (HTML and CSS)
- Opening Header in a new window? (PHP)
- Posting e-mail form problems (HTML and CSS)
- How to open a popup after a user closes browser window (JavaScript / DHTML / AJAX)
- owner form display problem (VB.NET)
- deactivating all windows except current window (VB.NET)
- Showing results of a form in new window (HTML and CSS)
Other Threads in the ASP.NET Forum
- Previous Thread: Sending sms through asp.net
- Next Thread: image imagemap difference



Linear Mode