View Complete Post
I have a mix of asp.net and asp classic pages in the same application. Could any tell how do I do a response.redirect to the asp classic pages? I get a error using the normal way.
Hi. I'm using the Dundas Chart Controls in VS 2005. These controls are built utilizing AJAX. I have a basic page with a dundas chart control containing a funnel chart. The funnel contains Quotes, Sales Orders and Invoices. When the user clicks on the control, I want to determine whether they clicked on Quotes, Sales Orders or Invoices and transfer to the appropriate Details Page. I've got the code working to determine which transaction type they clicked on; but, I get the "Response.Redirect cannot be called in a page callback." error when the page tries to redirect. Note: I get a similar issue if I try server.transfer.
Here's my code:
Dim hitTestResult As Dundas.Charting.WebControl.HitTestResult = Chart1.HitTest(e.X, e.Y)
If Not (hitTestResult Is Nothing) Then
Dim clicked As Dundas.Charting.WebControl.DataPoint = hitTestResult.Series.Points(hitTestResult.PointIndex)
Select Case hitTestResult.PointIndex
I am using some code similar to the code below to open a word document on my ASP.net app. Once the file has been downloaded and opened I then want to either redirect to another page or refresh the screen but nothing works after response.end and if i add it before response.end the browser never downloads the file?
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name
Response.ContentType = "application/octet-stream";
Any ideas? Thanks
I need to auto-redirect a page depending on the a ID number in the address bar. When I run this code, It is giving following exception
string temp = Request.Url.ToString(); string subTemp = temp.Substring(temp.IndexOf("ID=")); temp = subTemp.Remove(subTemp.IndexOf("&")); subTemp = temp.Substring((temp.IndexOf("=") + 1));
Response.Redirect("http://Share1/ncr/Default.aspx?ID=" + subTemp);
Server Error in '/' Application.
StartIndex cannot be less than zero.Parameter name: startIndex
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
I am working on a windows application using C#.
How i pass parameter and get response from asp page in my application?
I usually work with windows forms, and am just starting to work with ASP.Net, so appologies if this is a dumb question!
I have a master page which has a search button on it. The results of this are built up using a Linq statement and if there are any results, I want to display the results in a contents page.
On the masterpage, I have the following code:
Public Overridable ReadOnly Property SearchRes()
Private Sub DoSearch()
'some code to get a linq result
If res.Any Then
_res = res
LabelNoRes.Visible = True
On the SearchResults.aspx page I have this code.
Dim m As pxSite = CType(Page.Master, MasterPage)
If m.SearchRes IsNot Nothing Then
Label1.Text = "Results found = " & m.SearchRes.Count
m.searchRes is always nothing.
What am I doing wrong here?
I am new to ASP.NET, and was wondering how to pass a Page title through a parameter. In classic ASP I could just use something like: <title><%=Pagetitle%></title> but I cannot seem to get this to work in ASP.NET.
Thank you in advance,
The New Guy...
The statement is correct:
<asp:HyperLink ID="HyperLink2" runat="server" Text