Network-Path Reference URI / Scheme relative URLs

//example.com/img.png is a perfectly valid URI syntax as per RFC 3986: Section 4.2. It is relative to the current scheme, and therefore as you mentioned, it can be very useful when switching between HTTP and HTTPS, because you won’t need to explicitly specify the scheme. All modern browsers will understand that format, including IE 6. … Read more

Why do I get “Cannot redirect after HTTP headers have been sent” when I call Response.Redirect()?

According to the MSDN documentation for Response.Redirect(string url), it will throw an HttpException when “a redirection is attempted after the HTTP headers have been sent”. Since Response.Redirect(string url) uses the Http “Location” response header (http://en.wikipedia.org/wiki/HTTP_headers#Responses), calling it will cause the headers to be sent to the client. This means that if you call it a … Read more

Response.Redirect to new window

I just found the answer and it works 🙂 You need to add the following to your server side link/button: OnClientClick=”aspnetForm.target=”_blank”;” My entire button code looks something like: <asp:LinkButton ID=”myButton” runat=”server” Text=”Click Me!” OnClick=”myButton_Click” OnClientClick=”aspnetForm.target=”_blank”;”/> In the server side OnClick I do a Response.Redirect(“MyPage.aspx”); and the page is opened in a new window. The other … Read more

tech