Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Executing a asp.net page repeatedly????New page???

Reply
Thread Tools

Executing a asp.net page repeatedly????New page???

 
 
Dan
Guest
Posts: n/a
 
      12-29-2005
Hi,

I have an asp.net page i have made that creates an invoice based on the
invoice id given.

It works fine but the problem i have is i now want to loop through my
database and grab all the invoice numbers.

As it grabs each invoice number i want to pass it into my asp.net page,
execute it and display it so that each invoice falls on its own page leaving
me with an end result of pages of invoices all after one another so i just
click print.

The problem is as i have absolutely positioned everything with the
gridlayout so it doesn't move any of my items along so they all go on top of
each other in a mess.

SO ideally i want to execute the asp.net page for an invoice number, pass
the result not to the screen to be displayed but directly to the printer,
then move to the next invoice number and repeat.

Can anyone tell me how i can do this? Also it is important to mention i work
remotely from my server, so i am guessing any printing being fired off on
the server will attempt to print from my servers printer and not mine.

If that is the case i do have an internet printer so i would still be
interested in those answers however the option of getting the invoices to be
displayed neatly within my browser one after the other would suffice.

Options i have thought of is to put it all in a panel that is exactly one
page in size and then loop making new panels with the contents inside,
however if i had any invoices over a page long they would get truncated i
imagine?

I have also thought of making the first invoice then the second one to
always be x many pixels below it relative to the first etc, again very messy
way of doing it.

Surely there is a simple 'new page' ability?


Thank you in advance


 
Reply With Quote
 
 
 
 
Mr Newbie
Guest
Posts: n/a
 
      12-29-2005
Im not 100% sure what you are trying to do but it sounds like you are trying
to build one huge page composed of loads of invoice pages. If this is
correct, you are not really going about this in the best way I would think.

On your page, have a btnRetreive which populates the fields for the number
supplied, for each subsequent request like btnRetreieveNext_Click

Create an SQL statement which gets the next number and populate again.

--
Best Regards

The Inimitable Mr Newbie º¿º
"Dan" <> wrote in message
news:...
> Hi,
>
> I have an asp.net page i have made that creates an invoice based on the
> invoice id given.
>
> It works fine but the problem i have is i now want to loop through my
> database and grab all the invoice numbers.
>
> As it grabs each invoice number i want to pass it into my asp.net page,
> execute it and display it so that each invoice falls on its own page
> leaving me with an end result of pages of invoices all after one another
> so i just click print.
>
> The problem is as i have absolutely positioned everything with the
> gridlayout so it doesn't move any of my items along so they all go on top
> of each other in a mess.
>
> SO ideally i want to execute the asp.net page for an invoice number, pass
> the result not to the screen to be displayed but directly to the printer,
> then move to the next invoice number and repeat.
>
> Can anyone tell me how i can do this? Also it is important to mention i
> work remotely from my server, so i am guessing any printing being fired
> off on the server will attempt to print from my servers printer and not
> mine.
>
> If that is the case i do have an internet printer so i would still be
> interested in those answers however the option of getting the invoices to
> be displayed neatly within my browser one after the other would suffice.
>
> Options i have thought of is to put it all in a panel that is exactly one
> page in size and then loop making new panels with the contents inside,
> however if i had any invoices over a page long they would get truncated i
> imagine?
>
> I have also thought of making the first invoice then the second one to
> always be x many pixels below it relative to the first etc, again very
> messy way of doing it.
>
> Surely there is a simple 'new page' ability?
>
>
> Thank you in advance
>



 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      12-29-2005
First off, if it is the absolute positioning causing the problem, then the
obvious solution is to get rid of it, and redo your page with relative
positioning. Absolute positioning should almost never be used, in my
opinion.

Secondly, you should build a datalist or a repeater, with the right template
for displaying one invoice. Then just bind the list of invoices to the
datalist/repeater, and it will all look correct right away. The only part I
am not sure about is if you can force page breaks so that you print them all
on a separate page.

"Dan" <> wrote in message
news:...
> Hi,
>
> I have an asp.net page i have made that creates an invoice based on the
> invoice id given.
>
> It works fine but the problem i have is i now want to loop through my
> database and grab all the invoice numbers.
>
> As it grabs each invoice number i want to pass it into my asp.net page,
> execute it and display it so that each invoice falls on its own page
> leaving me with an end result of pages of invoices all after one another
> so i just click print.
>
> The problem is as i have absolutely positioned everything with the
> gridlayout so it doesn't move any of my items along so they all go on top
> of each other in a mess.
>
> SO ideally i want to execute the asp.net page for an invoice number, pass
> the result not to the screen to be displayed but directly to the printer,
> then move to the next invoice number and repeat.
>
> Can anyone tell me how i can do this? Also it is important to mention i
> work remotely from my server, so i am guessing any printing being fired
> off on the server will attempt to print from my servers printer and not
> mine.
>
> If that is the case i do have an internet printer so i would still be
> interested in those answers however the option of getting the invoices to
> be displayed neatly within my browser one after the other would suffice.
>
> Options i have thought of is to put it all in a panel that is exactly one
> page in size and then loop making new panels with the contents inside,
> however if i had any invoices over a page long they would get truncated i
> imagine?
>
> I have also thought of making the first invoice then the second one to
> always be x many pixels below it relative to the first etc, again very
> messy way of doing it.
>
> Surely there is a simple 'new page' ability?
>
>
> Thank you in advance
>



 
Reply With Quote
 
Daniel
Guest
Posts: n/a
 
      12-30-2005
Thanks for the comments so far.

Mr newbie - i had thought of the same method the problem is that when i have
20-30 invoices to print a day and going up all the time it gets very tedious
to do them one by one even with a click next and print method. Which is why
i want them all available to be printed straight off with one print.

Marina - not sure why you hate absolute positioning so much, each to their
own i guess. I find it much easier to position items exactly where i want
them that way, maybe it was the way i was doing it before.
I did consider the datarepeater route but I am quite the amateur with it so
i am not sure if you can help but i will explain why.

First of all is it not possible to use a data repeater with absolutely
positioned elements?
Secondly my invoice is laid out with an image of the company logo in the top
left, a logo and delivery address to the right of this that, when printed,
lines up perfectly with the paper we use so that part is peeled off and
stuck on a parcel, then under this a list of the items for the invoice but
laid out to look more pretty than just a grid but this is built in a table.

Can a layout like that be done using repeater?

Thanks in advance


"Marina" <> wrote in message
news:...
> First off, if it is the absolute positioning causing the problem, then the
> obvious solution is to get rid of it, and redo your page with relative
> positioning. Absolute positioning should almost never be used, in my
> opinion.
>
> Secondly, you should build a datalist or a repeater, with the right
> template for displaying one invoice. Then just bind the list of invoices
> to the datalist/repeater, and it will all look correct right away. The
> only part I am not sure about is if you can force page breaks so that you
> print them all on a separate page.
>
> "Dan" <> wrote in message
> news:...
>> Hi,
>>
>> I have an asp.net page i have made that creates an invoice based on the
>> invoice id given.
>>
>> It works fine but the problem i have is i now want to loop through my
>> database and grab all the invoice numbers.
>>
>> As it grabs each invoice number i want to pass it into my asp.net page,
>> execute it and display it so that each invoice falls on its own page
>> leaving me with an end result of pages of invoices all after one another
>> so i just click print.
>>
>> The problem is as i have absolutely positioned everything with the
>> gridlayout so it doesn't move any of my items along so they all go on top
>> of each other in a mess.
>>
>> SO ideally i want to execute the asp.net page for an invoice number, pass
>> the result not to the screen to be displayed but directly to the printer,
>> then move to the next invoice number and repeat.
>>
>> Can anyone tell me how i can do this? Also it is important to mention i
>> work remotely from my server, so i am guessing any printing being fired
>> off on the server will attempt to print from my servers printer and not
>> mine.
>>
>> If that is the case i do have an internet printer so i would still be
>> interested in those answers however the option of getting the invoices to
>> be displayed neatly within my browser one after the other would suffice.
>>
>> Options i have thought of is to put it all in a panel that is exactly one
>> page in size and then loop making new panels with the contents inside,
>> however if i had any invoices over a page long they would get truncated i
>> imagine?
>>
>> I have also thought of making the first invoice then the second one to
>> always be x many pixels below it relative to the first etc, again very
>> messy way of doing it.
>>
>> Surely there is a simple 'new page' ability?
>>
>>
>> Thank you in advance
>>

>
>



 
Reply With Quote
 
Mr Newbie
Guest
Posts: n/a
 
      12-30-2005
There is no 'Easy' answer to your question, its just really about choosing a
method which will work. To break down the problem into smaller steps if I am
correct ?

1.) Choose a range of invoices and then hit the print button right ?
2.) Watch them reel off the printer and have them peeled of and stuck on the
box ?

Why not skip the web forms entirely and use something like crystal reports
you can orgainise it so the reports go directly to the printer without
having to have each invoice form brought up.





--
Best Regards

The Inimitable Mr Newbie º¿º
"Daniel" <> wrote in message
news:...
> Thanks for the comments so far.
>
> Mr newbie - i had thought of the same method the problem is that when i
> have 20-30 invoices to print a day and going up all the time it gets very
> tedious to do them one by one even with a click next and print method.
> Which is why i want them all available to be printed straight off with one
> print.
>
> Marina - not sure why you hate absolute positioning so much, each to their
> own i guess. I find it much easier to position items exactly where i want
> them that way, maybe it was the way i was doing it before.
> I did consider the datarepeater route but I am quite the amateur with it
> so i am not sure if you can help but i will explain why.
>
> First of all is it not possible to use a data repeater with absolutely
> positioned elements?
> Secondly my invoice is laid out with an image of the company logo in the
> top left, a logo and delivery address to the right of this that, when
> printed, lines up perfectly with the paper we use so that part is peeled
> off and stuck on a parcel, then under this a list of the items for the
> invoice but laid out to look more pretty than just a grid but this is
> built in a table.
>
> Can a layout like that be done using repeater?
>
> Thanks in advance
>
>
> "Marina" <> wrote in message
> news:...
>> First off, if it is the absolute positioning causing the problem, then
>> the obvious solution is to get rid of it, and redo your page with
>> relative positioning. Absolute positioning should almost never be used,
>> in my opinion.
>>
>> Secondly, you should build a datalist or a repeater, with the right
>> template for displaying one invoice. Then just bind the list of invoices
>> to the datalist/repeater, and it will all look correct right away. The
>> only part I am not sure about is if you can force page breaks so that you
>> print them all on a separate page.
>>
>> "Dan" <> wrote in message
>> news:...
>>> Hi,
>>>
>>> I have an asp.net page i have made that creates an invoice based on the
>>> invoice id given.
>>>
>>> It works fine but the problem i have is i now want to loop through my
>>> database and grab all the invoice numbers.
>>>
>>> As it grabs each invoice number i want to pass it into my asp.net page,
>>> execute it and display it so that each invoice falls on its own page
>>> leaving me with an end result of pages of invoices all after one another
>>> so i just click print.
>>>
>>> The problem is as i have absolutely positioned everything with the
>>> gridlayout so it doesn't move any of my items along so they all go on
>>> top of each other in a mess.
>>>
>>> SO ideally i want to execute the asp.net page for an invoice number,
>>> pass the result not to the screen to be displayed but directly to the
>>> printer, then move to the next invoice number and repeat.
>>>
>>> Can anyone tell me how i can do this? Also it is important to mention i
>>> work remotely from my server, so i am guessing any printing being fired
>>> off on the server will attempt to print from my servers printer and not
>>> mine.
>>>
>>> If that is the case i do have an internet printer so i would still be
>>> interested in those answers however the option of getting the invoices
>>> to be displayed neatly within my browser one after the other would
>>> suffice.
>>>
>>> Options i have thought of is to put it all in a panel that is exactly
>>> one page in size and then loop making new panels with the contents
>>> inside, however if i had any invoices over a page long they would get
>>> truncated i imagine?
>>>
>>> I have also thought of making the first invoice then the second one to
>>> always be x many pixels below it relative to the first etc, again very
>>> messy way of doing it.
>>>
>>> Surely there is a simple 'new page' ability?
>>>
>>>
>>> Thank you in advance
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help for Executing Aspx page ar runtime using another page and getting its HTML msnews.microsoft.com ASP .Net 0 02-09-2005 08:37 AM
Having a problem using WebRequest inside code invoked by the Page_Load event to to download a page located on same server (as the currently executing page). Hasani \(remove nospam from address\) ASP .Net 9 09-29-2004 05:07 PM
Does ASP.NET wait for the entire request body before executing the ASP page? Peter Strøiman ASP .Net 2 10-28-2003 05:59 PM
Page-load executing twice mart ASP .Net 2 08-27-2003 06:13 PM
Determine Web Page for Requests Executing Corny ASP .Net 1 07-07-2003 04:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57