473,385 Members | 2,162 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,385 software developers and data experts.

Creating ASP.NET forms, that act like HTML forms

Question:

I'm creating an ASP.NET webform and I have questions about how the
ASP.NET form works. In ASP or
HTML a form with an action will transfer that forms items to another
page.

From the documentation I have read, there is nothing that describes
the use of the forms action
atribute. I did find text on the MSDN that describes the use of
Server.Transfer and Response.Redirect.

A simple Submit use of the "action" attribute doesn't seem to exist.

Is there a default way to submit a webform in ASP.NET as in HTML or
ASP? Yes I can store the form
data in a class, store the class in the session, retrive it from the
session as needed.
Thanks for any help :?
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 19 '05 #1
2 1507
Forms in ASP.NET postback to the same page that rendered them so you can
take advantage of the object model. When you postback all of the server side
controls are recreated and repopulated with the values that are posted back
to the page. This provides for a much higher level programming model, and
therefore makes you as the developer more productive.

Now, if you really want to post to a second page, you can. But then you're
back to [old] ASP style Request.Forms programming.

As an aside, in ASP.NET v2.0 you can do a cross page postback without sacrificing
the ASP.NET object model.

-Brock
http://staff.develop.com/ballen
Question:

I'm creating an ASP.NET webform and I have questions about how the
ASP.NET form works. In ASP or
HTML a form with an action will transfer that forms items to another
page.
From the documentation I have read, there is nothing that describes
the use of the forms action
atribute. I did find text on the MSDN that describes the use of
Server.Transfer and Response.Redirect.
A simple Submit use of the "action" attribute doesn't seem to exist.

Is there a default way to submit a webform in ASP.NET as in HTML or
ASP? Yes I can store the form
data in a class, store the class in the session, retrive it from the
session as needed.
Thanks for any help :?

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Nov 19 '05 #2
Setting the action attribute just isn't the ASP.NET way.
If you really must do it though, here are some tips:

1) Output an old fashioned non-server form to the client (without the runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

Note: In ASP.NET 2.0 you will be able to more easily post to another page.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"jlopes151" <jl*******@comcast-dot-net.no-spam.invalid> wrote in message
news:42**********@127.0.0.1...
Question:

I'm creating an ASP.NET webform and I have questions about how the
ASP.NET form works. In ASP or
HTML a form with an action will transfer that forms items to another
page.

From the documentation I have read, there is nothing that describes
the use of the forms action
atribute. I did find text on the MSDN that describes the use of
Server.Transfer and Response.Redirect.

A simple Submit use of the "action" attribute doesn't seem to exist.

Is there a default way to submit a webform in ASP.NET as in HTML or
ASP? Yes I can store the form
data in a class, store the class in the session, retrive it from the
session as needed.
Thanks for any help :?
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 19 '05 #3

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

Similar topics

6
by: gonzalo briceno | last post by:
I have been using phplib for a while and I really like the framework except for form creation. Maybe it is me but I in my opinion there isn't a good way to create forms or should I say, everything...
0
by: Matt Warner | last post by:
Hi guys, A couple of people have already posted questions about similar issues but haven't had any response. Occasionally, sometimes after running the app for a few hours, it bombs out saying...
1
by: Don Stefani | last post by:
Hello, I have a form that I want to submit "onchange", OK I've got that working, but when the form submits, I want to pass along a value to a CGI script, as if that value was in a hidden form...
6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
2
by: Pawan | last post by:
Hi Guys, I have this current assignment where I have to develop online forms for local municipal authorities. I have to use adobe acrobat to create online forms from PDFs (which I have never done...
6
by: Adam Tilghman | last post by:
Hi all, I have found that IE doesn't seem to respect the <SELECT> "multiple" attribute when set using DOM methods, although the attribute/property seems to exist and is updated properly. Those...
1
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating forms / html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what...
4
by: Ryan Knopp | last post by:
This is an update from a previous post, I just simplified the code. It seems that I can't get the image map to work with IE7. The page is located here http://www.theknopps.com/test.html and the...
2
by: yomadhu | last post by:
I created a dynamic form in javascript. Am unable to get those values in to php to display. I need all details. If i add 10 rows the i need to display those all values. Can any one help me for that...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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
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...

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.