Archive

Posts Tagged ‘asp.net’

asp.net, I never knew you.

It’s about one and a half yeas since I began to study asp.net, but I suddenly found that I never knew it.
  I  admire Microsoft, because gift us a tool which changed a hard thing become simple, it’s Visual studio 20xx. After a short time of study I could design small dynamic website even it relates to database. 
  A good tool could made me lazy. I haven’t seen the html code which is parsed by the aspx file in the past morn than one year, I only know the website satisfy my need, it’s enough.
  But things changed when I begin to use php to design website. Question was birthed while I wanted to handle two events which were caused by two submit button in a html page. I caught the process of a submitting and a reply, the following is the TCP stream:

POST /php/index.php HTTP/1.1

Host: localhost

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://localhost/php/test.htm

Content-Type: multipart/form-data; boundary=—————————28145205143241390720434603

Content-Length: 289



—————————–28145205143241390720434603

Content-Disposition: form-data; name="mytext"



qqqq

—————————–28145205143241390720434603

Content-Disposition: form-data; name="mysubmit1"



submit1

—————————–28145205143241390720434603–

HTTP/1.1 200 OK

Date: Thu, 12 Nov 2009 04:40:07 GMT

Server: Apache/2.2.12 (Unix) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k PHP/5.3.0 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0

X-Powered-By: PHP/5.3.0

Content-Length: 28

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Content-Type: text/html



<html>

qqqq</br>


</html>
POST /php/index.php HTTP/1.1

Host: localhost

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.15) Gecko/2009102815 Ubuntu/9.04 (jaunty) Firefox/3.0.15

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://localhost/php/test.htm

Content-Type: multipart/form-data; boundary=—————————1847787566628566691402884788

Content-Length: 295



—————————–1847787566628566691402884788

Content-Disposition: form-data; name="mytext"



qqqq

—————————–1847787566628566691402884788

Content-Disposition: form-data; name="mysubmit2"



sunmit2

—————————–1847787566628566691402884788–

HTTP/1.1 200 OK

Date: Thu, 12 Nov 2009 04:40:09 GMT

Server: Apache/2.2.12 (Unix) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k PHP/5.3.0 mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0

X-Powered-By: PHP/5.3.0

Content-Length: 28

Keep-Alive: timeout=5, max=99

Connection: Keep-Alive

Content-Type: text/html



<html>

qqqq</br>


</html>

  We could fond that the stream of the two times are different, and it only post information of submit button which caused the submit event. I  never paid attention on this process before.
 

Advertisements
Categories: Network Tags: