var newPageURL = "http://xyz.aspx";
window.location = newPageURL;
txt="There was an error on this page.\n\n";
txt+="Error description: " + err.description + "\n\n";
txt+="Click OK to continue.\n\n";
Currently it takes me to http://xyz.aspx which doesnt exist. I want to show in this case custom error page.
Please help ASAP. Thanks
I think you need to do URL Validation at server side.
Once it is validated then you can redirect to that
Use following code to validate URL.
PublicSharedFunction IsValid(ByVal Url AsString) AsBooleanDim sStream As Stream
Dim URLReq As HttpWebRequest
Dim URLRes As HttpWebResponse
URLReq = WebRequest.Create(Url)
URLRes = URLReq.GetResponse()
sStream = URLRes.GetResponseStream()
Dim reader AsString = New StreamReader(sStream).ReadToEnd()
ReturnTrueCatch ex As Exception
‘Url not valid
Jinal Desai - LIVE
Experience is mother of sage....
You can handle this by using Session_Start and Session_End in Global.asax. Handle logout time at <code>Session_End</code> .This function will also be called if user close the browser by clicking [X] button, not at the same time but when it session expires.
i need help in passing parameters from a datalist to another page.
this is how my app works:
i have a database ( access) a table with the following columns: id,title,desc,photo.
another table with the following columns: (startsin, endsin,price,tId)
on the first page (tourpack.aspx) i have a datalist, when user clicks on a button that is in the templateitem of the datalist, he will be transfered to another page called (showtour.aspx). what im trying to do is passing the ID parameter from the first page (table 1) to the second page (showtour.aspx) with the id number so he can see the specific details of that "tour" that are located In the second table.
any idea how it works? i would appreciate any kind of help.
On the buttonclick where you are transferring the user to another page.Pass the id in querystring as showtour.aspx?tourid=1.
Now read this id at pageload on showtour.aspx as Request.QueryString["tourid"] and load the details for this ID.
I have a radiobuttonlist control on my control, where the datasource is a collection, and I am using the DataTextFormatString to set the text field to a hyperlink. All this bit works, but where I am struggling to work is to add to the url path the value from the datavaluefield. Nothing I try works! Does anyone know how to set the datavaluefield into the url? Further, and one last question, my radiobuttonlist control is in a wizard step, and when the user clicks on a hyperlink, I want it to go on to the next step, all that is happening is that the link is going back to the first step. How do I correct this?
my problem with gridview
I create gridview like this
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False"
<asp:label id="Label4" runat="server" text="Account No :">
and in the below I have tow textbox and add button
I want when click on add button the value of the tow textbox adding/inserting
into the gridview (I want to add more than one value)
how can I make that and