130 likes | 265 Views
Forms and HTML Server controls. Simple web theory. The server stores, interprets data and distributes data(that is compiled into the web pages) and the client accesses the server to get at the data Clinet and server communicate over the internet using the http protocol. http protocol.
E N D
Simple web theory • The server stores, interprets data and distributes data(that is compiled into the web pages) and the client accesses the server to get at the data • Clinet and server communicate over the internet using the http protocol.
http protocol • HTTP is the protocol used by the world wide web in the transfer of information from one machine to another. • url (http:\\,) • http request • http respons • (if the web server can not find the page,it issues a response that includes an appropriate error message and it dispatches that page to the browser)
http is stateless protocol • HTTP doesn’t know whether the HTTP request that has been made,in part of an ongoing corresponding or just a single message. • The reason for that ,http is only to retrieve a single page for display.the internet would be slow and might even collapse if permanent connection needed to be maintained between browsers and servers,as people moved from one page to another.
http (continued) • HTTP makes the connection and delivers the request and then returns the response and disconnects. • Its downside is tha it can’nt distinguish between different request,there is no way for the http to dertermine where the request was orignated.
http “Stateless protocol” • stateless protocol is the Hypertext Transfer Protocol (HTTP) which is the foundation of data communication for the World Wide Web. • a stateless protocolis a communications protocol that treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of requests and responses. A stateless protocol does not require the server to retain session information or status about each communications partner for the duration of multiple requests.
One of the most common task of web developer is to collect and store information from the user. • The method by which information is transmitted via a web page is termed as a form
Server controls Server controls are tags that are understood by the server. There are three kinds of server controls: • HTML Server Controls - Traditional HTML tags • Web Server Controls - New ASP.NET tags • Validation Server Controls - For input validation
Html server control • HTML server controls are HTML tags understood by the server. <input name=“TextBox” type=“text” runat=“server”>
ASP.NET Server controls • <asp:textbox id=“txtName” runat=“server” ></asp:textbox>
Web pages • Pages with code behind (.aspx and .cs) A page model where server side code is stored in a separate code file • Pages with inline code (code is embedded in web page) A page model where server side code is stored in the same file as the markup
Web server controls • ASP.NET Web server controls are objects on ASP.NET Web pages that run when the page is requested and render markup to a browser. Many Web server controls are similar to familiar HTML elements, such as buttons and text boxes. • Types Html controls Web controls