| | |
Open form in the same window
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jun 2007
Posts: 13
Reputation:
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 8:14 pm. Reason: Keep It Organized - please use [code] tags
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:
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 8:15 pm. Reason: Keep It Organized - please use [code] tags
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 4: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:
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.
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 5: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:
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 8:15 pm. Reason: Keep It Organized - please use [code] tags
![]() |
Similar Threads
- 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
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox child class compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form gridview gudi iis image javascript list listbox menu mouse mssql nameisnotdeclared news novell numerical opera order parent problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security select serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview typeof validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xsl






