By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,979 Members | 951 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,979 IT Pros & Developers. It's quick & easy.

Saving aspx to file or other solution

P: n/a
We have a need, after a user fill out a form, to save that page (aspx)
and to send it as attachment by email , and to save it to a database for later
retrieval [the user will not be able to change nothing on page after submit]

any ideas how to save the aspx with user data to file ? maybe image ?
TIA
May 8 '07 #1
Share this Question
Share on Google+
13 Replies


P: n/a
On May 8, 8:22 am, ziros <z...@discussions.microsoft.comwrote:
We have a need, after a user fill out a form, to save that page (aspx)
and to send it as attachment by email , and to save it to a database for later
retrieval [the user will not be able to change nothing on page after submit]

any ideas how to save the aspx with user data to file ? maybe image ?
TIA
Attachments...
http://www.google.com/search?hl=en&q...ail+attachment

But are you sure that you need to have an attachment? A form can be
sent as a plain text message, in this case (depends on your need) it
can be saved as a text in the database, or in a "table" format (each
form field = a column in a table).

May 8 '07 #2

P: n/a
Ill try to explain better

As a user fill out a form (that might be just for defined period of time) we
have the
need to save the aspx page with the data as is, as a document that can't be
chaged.
It's like the a user statement fiiling a form.

than we want to save this page to a Database (as image or as html or pdf )
and to retrieve it later on just for viewing.

the page must saved as is with it's design.

TIA
"Alexey Smirnov" wrote:
On May 8, 8:22 am, ziros <z...@discussions.microsoft.comwrote:
We have a need, after a user fill out a form, to save that page (aspx)
and to send it as attachment by email , and to save it to a database for later
retrieval [the user will not be able to change nothing on page after submit]

any ideas how to save the aspx with user data to file ? maybe image ?
TIA

Attachments...
http://www.google.com/search?hl=en&q...ail+attachment

But are you sure that you need to have an attachment? A form can be
sent as a plain text message, in this case (depends on your need) it
can be saved as a text in the database, or in a "table" format (each
form field = a column in a table).

May 8 '07 #3

P: n/a
On May 8, 12:08 pm, ziros <z...@discussions.microsoft.comwrote:
Ill try to explain better

As a user fill out a form (that might be just for defined period of time) we
have the
need to save the aspx page with the data as is, as a document that can't be
chaged.
It's like the a user statement fiiling a form.

than we want to save this page to a Database (as image or as html or pdf )
and to retrieve it later on just for viewing.

the page must saved as is with it's design.

TIA

"Alexey Smirnov" wrote:
On May 8, 8:22 am, ziros <z...@discussions.microsoft.comwrote:
We have a need, after a user fill out a form, to save that page (aspx)
and to send it as attachment by email , and to save it to a database for later
retrieval [the user will not be able to change nothing on page after submit]
any ideas how to save the aspx with user data to file ? maybe image ?
TIA
Attachments...
http://www.google.com/search?hl=en&q...ail+attachment
But are you sure that you need to have an attachment? A form can be
sent as a plain text message, in this case (depends on your need) it
can be saved as a text in the database, or in a "table" format (each
form field = a column in a table).- Hide quoted text -

- Show quoted text -
The real form could contain a number of text boxes, buttons, lists and
other controls and I'm not sure if you really need to keep that
information as a user submission. Once the form is submitted you can
get all the fields and build a sort of confirmation page contained no
controls but all the details of user filing. It can be done using the
StringBuilder. The confirmation page will have two links "confirm" and
"cancel". When the "confirm" is clicked you will save the text into a
file or a database (I hope, the form does not have any graphics).
What's all.

May 8 '07 #4

P: n/a
Hi ziros,

ziros wrote:
Ill try to explain better

As a user fill out a form (that might be just for defined period of time) we
have the
need to save the aspx page with the data as is, as a document that can't be
chaged.
It's like the a user statement fiiling a form.

than we want to save this page to a Database (as image or as html or pdf )
and to retrieve it later on just for viewing.

the page must saved as is with it's design.
I don't think you can actually get a screenshot from the user's browser
(and that's what you need, right?)
What I could imagine is something like this: You take a screenshot of
the empty form (at development time), and after the user submits it, you
copy that screenshot and paste the text into pre-defined positions of
that copy. Then you display that image to the user with confirm or
cancel buttons. If the user confirms, you keep the image, otherwise you
delete it.

Does that sound reasonable? The user will actually confirm exactly what
you will have saved.

As an alternative (but this is a guess of mine), have a look at PDF forms.

Hope this helps,

Roland
May 8 '07 #5

P: n/a
Thx alexy & roland,

I suspected that I can't just screenshot the user for with data as is.
I do need to maintain the form graphics as muc has possible, and to this not
per
form I'll create but to be able to use that snapshot on many form , without
writing specifics all the time.

Roland :
about that "You take a screenshot of the empty form"
what do you exactly mean ? and what you meant about the image thing ?
would like some more if you can explain.

Alexy:
as a last option if i can't come up with something close to what i need , i
can think of your method of gathering the data.

TIA


"Roland Dick" wrote:
Hi ziros,

ziros wrote:
Ill try to explain better

As a user fill out a form (that might be just for defined period of time) we
have the
need to save the aspx page with the data as is, as a document that can't be
chaged.
It's like the a user statement fiiling a form.

than we want to save this page to a Database (as image or as html or pdf )
and to retrieve it later on just for viewing.

the page must saved as is with it's design.

I don't think you can actually get a screenshot from the user's browser
(and that's what you need, right?)
What I could imagine is something like this: You take a screenshot of
the empty form (at development time), and after the user submits it, you
copy that screenshot and paste the text into pre-defined positions of
that copy. Then you display that image to the user with confirm or
cancel buttons. If the user confirms, you keep the image, otherwise you
delete it.

Does that sound reasonable? The user will actually confirm exactly what
you will have saved.

As an alternative (but this is a guess of mine), have a look at PDF forms.

Hope this helps,

Roland
May 8 '07 #6

P: n/a
On May 8, 2:55 pm, ziros <z...@discussions.microsoft.comwrote:
Thx alexy & roland,

I suspected that I can't just screenshot the user for with data as is.
I do need to maintain the form graphics as muc has possible, and to this not
per
form I'll create but to be able to use that snapshot on many form , without
writing specifics all the time.
Well, if you understand that there is no way, why do you still
thinking about it?

Alexy:
as a last option if i can't come up with something close to what i need , i
can think of your method of gathering the data.
Okay, let me know if you have further questions.

May 8 '07 #7

P: n/a
It sounds like you're trying to do something similar to what we're seeking a
solution for. In our case, we have people fill out an online form, which is
designed to look very much like our client's traditional printed forms.
Then when the user submits it, we need to send an HTML email to the
appropriate person. The effect is that the employee gets a form they can
print out that looks like forms customers filled out the old fashioned way.

The way we've done it in ASP is by writing a whole lotta "str = str & ..."
We've gotten it down to where it's pretty easy (but still ugly): Copy the
HTML produced by the ASP page; paste into the editor of your choice; prepend
each line with "str = str & "; tack a closing quote on the end; substitute
the <INPUT ...tags with the <%= variable they filled in;

But, as noted, it's ugly.

On a Java site where I worked, they use the 'mailer2' taglib, which makes it
pretty easy to generate HTML email on the fly. I'm looking for something
similar in asp.net. Kind of a control that lets you define the HTML in its
body, complete with variables, that sends an email.

If anybody knows of such a thing, or has other suggestions, please share!

Dave


"ziros" <zi***@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
Ill try to explain better

As a user fill out a form (that might be just for defined period of time)
we
have the
need to save the aspx page with the data as is, as a document that can't
be
chaged.
It's like the a user statement fiiling a form.

than we want to save this page to a Database (as image or as html or pdf )
and to retrieve it later on just for viewing.

the page must saved as is with it's design.

TIA
"Alexey Smirnov" wrote:
On May 8, 8:22 am, ziros <z...@discussions.microsoft.comwrote:
We have a need, after a user fill out a form, to save that page (aspx)
and to send it as attachment by email , and to save it to a database
for later
retrieval [the user will not be able to change nothing on page after
submit]
>
any ideas how to save the aspx with user data to file ? maybe image ?
TIA
Attachments...
http://www.google.com/search?hl=en&q...ail+attachment

But are you sure that you need to have an attachment? A form can be
sent as a plain text message, in this case (depends on your need) it
can be saved as a text in the database, or in a "table" format (each
form field = a column in a table).

May 8 '07 #8

P: n/a
Hi ziros,

Sorry, I'll try to explain better.

ziros wrote:
Roland :
about that "You take a screenshot of the empty form"
what do you exactly mean ? and what you meant about the image thing ?
would like some more if you can explain.
What I mean is that you have a screenshot of the form as it is displayed
on your computer. That screenshot is in a graphics file. Now you can
measure the coordinates in the image where you want to place text (using
Paint or some other image editor). Then you know for example,
"Firstname" starts at 100,100 pixels.

When the user filled out the form, you do some image editing on the
server. In fact, you copy the screenshot and write the text the user
entered into the "Firstname" textbox in the image at 100,100. (The
DrawString method of the Graphics object might be handy here). Same for
other textboxes. What you end up with, is an image with all the text the
user entered in it.

Then you display that image to the user. He can't change anything any
more, it's take it or leave it; confirm or cancel. The image will most
likely look different from the form the user filled in (window size,
screen resolution, browser etc.); but if the user confirms, he confirms
the image exactly as you have stored it, and you can save the image in
the database (or wherever).

Hope this helps,

Roland
May 9 '07 #9

P: n/a
Thx alexy,Rolnad,Dave

Well if I'll try the Image thing: couple of question...

what if the Form is longer and to view it all a scroll is needed, can I
still snapshot the form to image file ?

as I understand for each form I'll have to be specific with that method...

I'll start giving it a try.

Thx all


"Dave Bender" wrote:
It sounds like you're trying to do something similar to what we're seeking a
solution for. In our case, we have people fill out an online form, which is
designed to look very much like our client's traditional printed forms.
Then when the user submits it, we need to send an HTML email to the
appropriate person. The effect is that the employee gets a form they can
print out that looks like forms customers filled out the old fashioned way.

The way we've done it in ASP is by writing a whole lotta "str = str & ..."
We've gotten it down to where it's pretty easy (but still ugly): Copy the
HTML produced by the ASP page; paste into the editor of your choice; prepend
each line with "str = str & "; tack a closing quote on the end; substitute
the <INPUT ...tags with the <%= variable they filled in;

But, as noted, it's ugly.

On a Java site where I worked, they use the 'mailer2' taglib, which makes it
pretty easy to generate HTML email on the fly. I'm looking for something
similar in asp.net. Kind of a control that lets you define the HTML in its
body, complete with variables, that sends an email.

If anybody knows of such a thing, or has other suggestions, please share!

Dave


"ziros" <zi***@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
Ill try to explain better

As a user fill out a form (that might be just for defined period of time)
we
have the
need to save the aspx page with the data as is, as a document that can't
be
chaged.
It's like the a user statement fiiling a form.

than we want to save this page to a Database (as image or as html or pdf )
and to retrieve it later on just for viewing.

the page must saved as is with it's design.

TIA
"Alexey Smirnov" wrote:
On May 8, 8:22 am, ziros <z...@discussions.microsoft.comwrote:
We have a need, after a user fill out a form, to save that page (aspx)
and to send it as attachment by email , and to save it to a database
for later
retrieval [the user will not be able to change nothing on page after
submit]

any ideas how to save the aspx with user data to file ? maybe image ?
TIA
>
Attachments...
http://www.google.com/search?hl=en&q...ail+attachment
>
But are you sure that you need to have an attachment? A form can be
sent as a plain text message, in this case (depends on your need) it
can be saved as a text in the database, or in a "table" format (each
form field = a column in a table).
>
>


May 9 '07 #10

P: n/a
Roland, I mangaed to try your way, I did managed to snapshot the Form
I did managed to write text on the Image, now I have some problem... what if
the form consists with RadioButton , CheckBoxes ? how can I accomplish the
writing og this data ?

TIA

"ziros" wrote:
Thx alexy,Rolnad,Dave

Well if I'll try the Image thing: couple of question...

what if the Form is longer and to view it all a scroll is needed, can I
still snapshot the form to image file ?

as I understand for each form I'll have to be specific with that method...

I'll start giving it a try.

Thx all


"Dave Bender" wrote:
It sounds like you're trying to do something similar to what we're seeking a
solution for. In our case, we have people fill out an online form, which is
designed to look very much like our client's traditional printed forms.
Then when the user submits it, we need to send an HTML email to the
appropriate person. The effect is that the employee gets a form they can
print out that looks like forms customers filled out the old fashioned way.

The way we've done it in ASP is by writing a whole lotta "str = str & ..."
We've gotten it down to where it's pretty easy (but still ugly): Copy the
HTML produced by the ASP page; paste into the editor of your choice; prepend
each line with "str = str & "; tack a closing quote on the end; substitute
the <INPUT ...tags with the <%= variable they filled in;

But, as noted, it's ugly.

On a Java site where I worked, they use the 'mailer2' taglib, which makes it
pretty easy to generate HTML email on the fly. I'm looking for something
similar in asp.net. Kind of a control that lets you define the HTML in its
body, complete with variables, that sends an email.

If anybody knows of such a thing, or has other suggestions, please share!

Dave


"ziros" <zi***@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
Ill try to explain better
>
As a user fill out a form (that might be just for defined period of time)
we
have the
need to save the aspx page with the data as is, as a document that can't
be
chaged.
It's like the a user statement fiiling a form.
>
than we want to save this page to a Database (as image or as html or pdf )
and to retrieve it later on just for viewing.
>
the page must saved as is with it's design.
>
TIA
>
>
"Alexey Smirnov" wrote:
>
On May 8, 8:22 am, ziros <z...@discussions.microsoft.comwrote:
We have a need, after a user fill out a form, to save that page (aspx)
and to send it as attachment by email , and to save it to a database
for later
retrieval [the user will not be able to change nothing on page after
submit]
>
any ideas how to save the aspx with user data to file ? maybe image ?
TIA

Attachments...
http://www.google.com/search?hl=en&q...ail+attachment

But are you sure that you need to have an attachment? A form can be
sent as a plain text message, in this case (depends on your need) it
can be saved as a text in the database, or in a "table" format (each
form field = a column in a table).
May 9 '07 #11

P: n/a
Hi ziros,

ziros wrote:
Roland, I mangaed to try your way, I did managed to snapshot the Form
I did managed to write text on the Image, now I have some problem... what if
the form consists with RadioButton , CheckBoxes ? how can I accomplish the
writing og this data ?
What you could do is write an X to the RadioButton or CheckBox, or a
special character in Wingdings Font that renders as a dot.
>what if the Form is longer and to view it all a scroll is needed, can I
still snapshot the form to image file ?
You can take several snapshots and paste them together to one image
file. Or you can try whether you can have an increased virtual
resolution on your monitor (so that the content scrolls when the mouse
cursor moves down), maximize the browser and take a snapshot then (but
I'm not sure that works... might be worth a try).
>as I understand for each form I'll have to be specific with that method...
Yes, that's right, unless you save the coordinates and the controls to
collect the user information from in a database (or xml file or
somewhere) and have a general routine for the back-end processing.
Consider that if you have several forms, or forms that might need
updates every now and then, and you're otherwise happy with this approach.

Glad you found it's working though.

Roland
May 9 '07 #12

P: n/a
Ronald thx,
any Idea of how to acomplish checkbox or radio button injection
to the image and not only text ?

TIA
"Roland Dick" wrote:
Hi ziros,

ziros wrote:
Roland, I mangaed to try your way, I did managed to snapshot the Form
I did managed to write text on the Image, now I have some problem... what if
the form consists with RadioButton , CheckBoxes ? how can I accomplish the
writing og this data ?

What you could do is write an X to the RadioButton or CheckBox, or a
special character in Wingdings Font that renders as a dot.
what if the Form is longer and to view it all a scroll is needed, can I
still snapshot the form to image file ?

You can take several snapshots and paste them together to one image
file. Or you can try whether you can have an increased virtual
resolution on your monitor (so that the content scrolls when the mouse
cursor moves down), maximize the browser and take a snapshot then (but
I'm not sure that works... might be worth a try).
as I understand for each form I'll have to be specific with that method...

Yes, that's right, unless you save the coordinates and the controls to
collect the user information from in a database (or xml file or
somewhere) and have a general routine for the back-end processing.
Consider that if you have several forms, or forms that might need
updates every now and then, and you're otherwise happy with this approach.

Glad you found it's working though.

Roland
May 10 '07 #13

P: n/a
Hi ziros,

ziros wrote:
any Idea of how to acomplish checkbox or radio button injection
to the image and not only text ?
Well, if this
>What you could do is write an X to the RadioButton or CheckBox, or a
special character in Wingdings Font that renders as a dot.
is not sufficient, you can of course also draw lines, circles or other
objects into the image. You could even take a screenshot of a checked
checkbox and a checked radiobox and paste that over the original
checkbox/radiobox.

Roland
May 10 '07 #14

This discussion thread is closed

Replies have been disabled for this discussion.