473,413 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Help, page loads twice

I need help! A page I'm working on builds an HTML string based on a bunch of
data in different tables and databases. Then it does a response.write with a
contenttype of application/msword. The result being an HTML page that's
editable in word, inside of Internet Explorer. The problem I'm getting is
that the page is loading twice. It's blowing out session information, so I
can't keep track of how many times it has ran. Here's the code.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim strRequest() As String
Dim x As Integer
Dim strResponse As String
If Not Page.IsPostBack Then
If Not Request("CallSheetID") Is Nothing AndAlso _
Convert.ToString(Request("CallSheetID")).IndexOf(" ,") > 0 Then
strRequest = Convert.ToString(Request("CallSheetID")).Split("," )
For x = 0 To strRequest.GetUpperBound(0)
strResponse += BuildSummary(Convert.ToInt32(strRequest(x)),
_
Convert.ToInt32(strRequest(strRequest.GetUpperBoun d(0))))
Next
Else
If IsNumeric(Request("CallSheetID")) Then
strResponse =
BuildSummary(Convert.ToInt32(Request("CallSheetID" )), _
Convert.ToInt32(Request("CallSheetID")))
End If
End If
If strResponse.Length > 0 Then
Response.ContentType = "application/msword"
Response.Write(strResponse)
Response.Flush()
Try
Response.End()
Catch ex As System.Threading.ThreadAbortException
Return
End Try
End If
End If
End Sub
Nov 17 '05 #1
0 1780

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Manny | last post by:
I have a web form "Page1.asp" and it reads data from a database, does some calculations, and displays the records in pages. Works fine. I have a button that displays on the page, defined as...
4
by: ani | last post by:
I have a datalist control in my aspx page(this is paginated and everytime submits to itself). I am calling a function within my datalist that returns a html control (radio button ) in the form of...
3
by: Sue Rawlings | last post by:
I am using VS .net and when I have a page with smartnav = true, and this page (that has smartnav on) does a response.redirect to another page, the page load event occurs twice for the page...
1
by: spammy | last post by:
Hi all, Im having difficulty serving synamically generated PDFs to clients via asp.net. Im using crystal reports to generate them. In my page load I have the following: private void...
0
by: Guy W via DotNetMonster.com | last post by:
I read and tried to use the repeater paging method I found on 4 Guys from Rolla (I've tried others also) but it doesn't seem to work. Please see the code I have below and tell me what I may be...
4
by: Jeff User | last post by:
Hi I tryed to solve this problem over in the framework.asp group, but still am having trouble. Hope someone here can help. using .net 1.1, VS 2003 and C# I have an asp.DataGrid control with a...
1
by: Mike Collins | last post by:
I someone can please help, I am about at an end in trying to figure this out. I am adding some dynamic controls to my page (I found out that I was supposed to be doing that in the oninit event,...
6
by: dean.h.brown | last post by:
How do you get the Calendar date when the page first loads? I have this code (which works once the user selects a date) - I get "12:00:00 AM" for the label.text when the page first loads: ...
2
by: =?Utf-8?B?SnJ4dHVzZXIx?= | last post by:
I just started using Windows Live OneCare, I had been using Norton, but was unable to fix the problems I was having. I have yet been unsuccessful with OneCare as well. I keep getting the same...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.