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

Silly newbe question -Forms

Hello,
I'm trying to understand how a aspx form gets submitted to the server
when there is no action attribute. I am under the impression you would
need some kind of html valid button attribute in order to get the form
to post.Since Asp.net is browser independent ,how does the form know(
within the confines of the xhtml or html specs)that it is supposed to
go anywhere.(Even to itself)
No "action" and no "value= Submit" attributes?

Thanks
Mike

Feb 20 '06 #1
7 1189
When you specify your submit button on the form you set the OnClick
event to a Sub Routine. That sub can process the form. Like this.

---> The below code is under the <Script> tags of your page or in a
codebehind page
Public Sub Form_Submit(sender As Object, e As System.EventArgs)
'Code to process form, save in database or whatever you want
End Sub

---->The below code is inbetween the <form> tags on your page
<Form Runat="Server">
<asp:button runat="Server" ID="btnSubmit text="Submit"
OnClick="Form_Submit"/>
</Form>
Hope this helps,
Jeremy Reid
http://blackstaronline.net/hgtit

Feb 20 '06 #2
"Public Sub Form_Submit" does not submit the form to the server either,
it's just a function?Could be clientside?Right?

Feb 20 '06 #3
The 'Runat=Server' specifies that it will process on the server. With
that the page will get handed to the client as HTML. Your actual VB or
C#, etc. code is not passed to the client (obviously). The form will do
a postback to the server calling your Sub server side.

Are you interested in doing client side programming?

Feb 20 '06 #4
"Runat" is not a valid html attribute.So that cant tell the browser to
send back to the server.
I'm just trying to find out how the form gets sent back.It MUST be sent
back within the specifications.
You just cant make up tags.
I know it works, but why??
Mike

Feb 20 '06 #5
On 20 Feb 2006 13:16:30 -0800, am******@gmail.com wrote:
"Runat" is not a valid html attribute.So that cant tell the browser to
send back to the server.
I'm just trying to find out how the form gets sent back.It MUST be sent
back within the specifications.
You just cant make up tags.
I know it works, but why??
Mike


hint: Look at the source code you see in the browser with view->source
Feb 20 '06 #6
Yes, I realize that "Runat" is not valid HTML code. The .NET server
inserts some of the necessary client side commands into java for you.
You should check out http://asp.net they have some great articles on
the inner workings of the .NET framework that might be a little more
helpful for you.
Jeremy Reid
http://blackstaronline.net/hgtit

Feb 20 '06 #7
Thanks Both of You.
Sometimes I just aint thinking!
Mike
blackstaronline.net wrote:
Yes, I realize that "Runat" is not valid HTML code. The .NET server
inserts some of the necessary client side commands into java for you.
You should check out http://asp.net they have some great articles on
the inner workings of the .NET framework that might be a little more
helpful for you.
Jeremy Reid
http://blackstaronline.net/hgtit


Feb 21 '06 #8

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

Similar topics

1
by: Sebastien GIRAUD | last post by:
Hello, First let say that am french and that i'll try to write the best english i can... I'm a python newbe and have the following problem : I try to create 2 threads in a server program and they...
1
by: Ron | last post by:
Is this built into any of the python versions? Need it! Using 2.3.5 and doesn't seem to have it.Newbe needs help!email ron@nac.net Thanks Ron
7
by: Jean Pierre Daviau | last post by:
Hi, <script language="javascript" type="text/javascript"> if(navigator.appName.indexOf("Netscape") != -1){ document.writeln('<link rel="stylesheet" href="~styles/aquarelle_ns.css"...
9
by: Yaro | last post by:
Hello DB2/NT 8.1.3 Sorry for stupid questions. I am newbe in DB2. 1. How can I read *.sql script (with table and function definitions) into a database? Tool, command... 2. In Project Center...
6
by: Andy | last post by:
.... as I know the answer will be so simple, but here goes... I cannot creating a new asp.net projects in VS2003 in a directory other than the default suggested directory (i.e....
1
by: Jim | last post by:
I have created a windows form that contains several tab pages which contain a panels. On a tab page I am trying to dynamically create a series of buttons in that pages panel. I am failing because...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
1
by: stan | last post by:
I am a complete newbe to python and only got here because I am trying to set up iTunes in game Second Life. Have followed all instructions but keep getting an error reading from my XP Pro OS as...
10
by: r035198x | last post by:
There are a lot of common C mistakes. I have put together the ones I consider to be the silliest made by C programmers. These are usually the source of the popular C programming tears and remembering...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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?
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...

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.