Open form in the same window

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jun 2007
Posts: 13
Reputation: rocket1356 is an unknown quantity at this point 
Solved Threads: 0
rocket1356 rocket1356 is offline Offline
Newbie Poster

Open form in the same window

 
0
  #1
May 21st, 2008
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.

  1. <asp:image imageurl="~/common/images/demos/header-buildsummary.png" width="125" height="34" alternatetext="CCI Form" runat="server" cssclass="site"
  2. id="cciform" onmouseover="this.src='common/images/demos/header-cciform-hover.png';"
  3. onmouseout="this.src='common/images/demos/header-cciform.png';"
  4. 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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,293
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Open form in the same window

 
0
  #2
May 21st, 2008
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!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 13
Reputation: rocket1356 is an unknown quantity at this point 
Solved Threads: 0
rocket1356 rocket1356 is offline Offline
Newbie Poster

Re: Open form in the same window

 
0
  #3
May 21st, 2008
Correct. Just like if you click on the"IRC Chat Network" image to the right of you screen. It will open the link on the same window.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 13
Reputation: rocket1356 is an unknown quantity at this point 
Solved Threads: 0
rocket1356 rocket1356 is offline Offline
Newbie Poster

Re: Open form in the same window

 
0
  #4
May 21st, 2008
Originally Posted by majestic0110 View Post
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,293
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Open form in the same window

 
0
  #5
May 21st, 2008
  1. 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!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 13
Reputation: rocket1356 is an unknown quantity at this point 
Solved Threads: 0
rocket1356 rocket1356 is offline Offline
Newbie Poster

Re: Open form in the same window

 
0
  #6
May 21st, 2008
Originally Posted by majestic0110 View Post
  1. 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.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,293
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Open form in the same window

 
0
  #7
May 21st, 2008
Show me the complete code, it may be a slight error somewhere. That should work.
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!
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,293
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Open form in the same window

 
0
  #8
May 21st, 2008
Actually, create an event handler for the image (by double clicking it in Visual studio) then in the event handler try this:

  1. Response.Redirect("pagetogoto.aspx");

Or for Visual Basic

  1. 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!
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 13
Reputation: rocket1356 is an unknown quantity at this point 
Solved Threads: 0
rocket1356 rocket1356 is offline Offline
Newbie Poster

Re: Open form in the same window

 
0
  #9
May 21st, 2008
Originally Posted by majestic0110 View Post
Actually, create an event handler for the image (by double clicking it in Visual studio) then in the event handler try this:

  1. Response.Redirect("pagetogoto.aspx");

Or for Visual Basic

  1. Response.Redirect("pagetogoto.aspx")

This should fix it. Hope this helps!


  1. <%@ Page Language ="C#"%>
  2. <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <script runat="server">
  6.  
  7.  
  8. </script>
  9.  
  10. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  11. <head id="Head1" runat="server">
  12. <title>UCOSQA - Home</title>
  13. <link href="common/css/rotator.css" type="text/css" rel="stylesheet" />
  14. <link rel="stylesheet" type="text/css" href="common/css/demos.css" />
  15. <!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="common/css/ie6-demos.css" /><![endif]-->
  16. </head>
  17. <body>
  18. <form id="form1" runat="server">
  19. <!-- Body Container -->
  20. <div id="body-container">
  21.  
  22. <!-- Header Container -->
  23. <div id="header-container">
  24.  
  25. <!-- Header Navigation -->
  26. <div id="header">
  27. <asp:image imageurl="~/common/images/demos/header-logo.png" width="121" height="34" alternatetext="ComponentArt" runat="server" cssclass="logo" id="ca_logo" />
  28. <asp:image imageurl="~/common/images/demos/header-divider.png" width="35" height="34" alternatetext="|" runat="server" cssclass="divider" id="divider" />
  29. <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" />
  30. <asp:image imageurl="~/common/images/navigation/separator.png" width="353px"
  31. height="34px" alternatetext=" " runat="server" cssclass="separator"
  32. id="separator" />
  33. <asp:image imageurl="~/common/images/demos/header-buildsummary.png" width="125"
  34. height="34" alternatetext="UCOS QA - Build Summary" runat="server"
  35. cssclass="site" id="buildsummary"
  36. onmouseover="this.src='common/images/demos/header-buildsummary-hover.png';"
  37. onmouseout="this.src='common/images/demos/header-buildsummary.png';"
  38. onclick="window.open('WebForm/UCOSQA','_blank');" title="UCOSQA - Build Summary" />
  39. <asp:image imageurl="~/common/images/demos/header-cciform.png" width="125"
  40. height="34" alternatetext="CCI Form" runat="server" cssclass="site"
  41. id="cciform"
  42. onmouseover="this.src='common/images/demos/header-cciform-hover.png';"
  43. onmouseout="this.src='common/images/demos/header-cciform.png';"
  44. onclick="Response.Redirect(copyofdefault.aspx);" title="UCOSQA - CCI Form"
  45. TabIndex="1"/>
  46. </div>
Last edited by peter_budo; May 24th, 2008 at 8:15 pm. Reason: Keep It Organized - please use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,293
Reputation: majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about majestic0110 has a spectacular aura about 
Solved Threads: 67
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Nearly a Posting Virtuoso

Re: Open form in the same window

 
0
  #10
May 21st, 2008
Did you try what I suggested in post 8 - it should work !
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!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC