4 Replies - 3498 Views - Last Post: 24 October 2011 - 02:52 PM

#1 John-Ellis  Icon User is offline

  • D.I.C Regular

Reputation: 8
  • View blog
  • Posts: 305
  • Joined: 23-March 10

WebPage will not load?

Posted 13 October 2011 - 12:30 PM

Hi All,

I have added a new webform to my solution and called it Series1.

In the click event on the image button I have used the redirect code to find my new webform, but I get the error 401 or cannot display webpage screen.

Please see below my code.

Code for image button

Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
        Response.Redirect("C:\Users\*******\Documents\Visual Studio 2008\Projects\TestBuild\Series1.aspx")
    End Sub
End Class



I am not sure how I should be typing the location of the Series1 web page to be honest, weather it is the actual location of the page on my system, or a http location.

Any guidence would be much appreciated.

Thanks

John

Is This A Good Question/Topic? 0
  • +

Replies To: WebPage will not load?

#2 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1819
  • View blog
  • Posts: 4,627
  • Joined: 14-March 10

Re: WebPage will not load?

Posted 13 October 2011 - 12:39 PM

If the pages are in the same project, then just:
Response.Redirect("Series1.aspx")

Was This Post Helpful? 1
  • +
  • -

#3 John-Ellis  Icon User is offline

  • D.I.C Regular

Reputation: 8
  • View blog
  • Posts: 305
  • Joined: 23-March 10

Re: WebPage will not load?

Posted 13 October 2011 - 12:56 PM

:) spot on, that works :)

Thanks again

John
Was This Post Helpful? 0
  • +
  • -

#4 smohd  Icon User is offline

  • Critical Section
  • member icon


Reputation: 1819
  • View blog
  • Posts: 4,627
  • Joined: 14-March 10

Re: WebPage will not load?

Posted 13 October 2011 - 01:03 PM

Glad I could help :)
Was This Post Helpful? 0
  • +
  • -

#5 Frinavale  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 203
  • View blog
  • Posts: 776
  • Joined: 03-June 10

Re: WebPage will not load?

Posted 24 October 2011 - 02:52 PM

The more important thing to note about the code that fixed your problem is that it redirects using a web URL as apposed to a path to a file located somewhere on the server.

-Frinny
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1