473,387 Members | 1,530 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,387 software developers and data experts.

Saving aspx to file or other solution

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
13 1571
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
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
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: liam | last post by:
Hi, I have seen this problem is a couple of other places in the group but can't find an answer to it. Basically I have as aspx file that opens properly in Opera but not in IE. IE gives a...
1
by: rinkal brahmbhatt | last post by:
what if i delete an aspx file from my project if i had compiled the project once....will that project run without any error.....or will i need the aspx file after compilation *** Sent via...
0
by: Ersin Gençtürk | last post by:
hi, I am working with utf-8 encoded aspx files.But in visual studio.net 2003 when I make somechanges to a utf-8 aspx file and click save , it reverts the encoding to another (win-1254) format.I...
2
by: M. D'Costa | last post by:
Hello, I have an ASP.NET application that allows a user to save a csv file with certain data they requested. The problem is as follows: On my machine it works fine and prompts me to save the...
0
by: ES | last post by:
Hello, I'm using VS 2003 for an ASP.NET project. I have a number of web forms, components, user controls, etc in the project. It compiles and runs correctly. One form when opened in the...
7
by: Steve Bugden | last post by:
Hi, I am trying to reference an html page from an aspx file. The intention is that the html file will contain the content for my web site and the aspx will contain the navigation, logo etc. Then...
7
by: Matt | last post by:
In Solution, In Web project Test.aspx file, How can i refer to dll on page directives. WebDll project(same solution) I dont want to use codebehind pages such as (test.aspx.cs) WebProject...
3
by: David | last post by:
hi... i have webform *.aspx file, wich do some bd requests and generates (how it should) html file to show on client pc.. now... i want my web solution, this web form is part of this solution,...
2
by: Bruce Russell | last post by:
This may sound stupid but I can't rename the WebForm1.aspx in the solution explorer. The file is located in my local web server at C:\Inetpub\wwwroot\Lab3-VB-Starter\WebForm1.aspx Is there...
16
by: flip2flik | last post by:
Hi. I am using visual web developer express edition and I am using vb.net as the programming language. I want to create a new aspx file on a button click. I will have a template that the new...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...

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.