Home| Progetto| Web| Faq| Acronimi | ||||
Argomenti Documenti pubblicabili:1120
Scripts:1282 Documenti non pubblicabili:162 Categorie tematiche:68 .Net |_C# |_Visual basic.net |_Asp.net Active Server Pages C++ Cascade Style Sheet JavaScript Mysql Php Xml Java |_Java 2 Micro Edition |_Java server pages |_Java Servlet Oracle |_PLSQL PostgreSQL Unix
Asp.net...
Info:
Esecuzione di una pagina aspx
Oracle...
Script:
dbms_output.put_line
Unix...
Tip:
Rimuovere un file in Unix / Delete a file
PLSQL...
Script:
Record
Asp.net...
Tip:
Un solo web form lato server...
Asp.net...
Faq:
Cosa è un Controllo Server (Server Control)?
Shell scripting...
Script:
Script for archiving and compressing folder and file
La rabbia è creativa, la depressione è senza utilità
Dyson, Freeman J.
Php Funzione mail()
Charles Babbage(1791-1871) nel 1823 ottenne dal governo 100 Sterline per la costruzione del calcolatore Different Engine.
La rabbia è creativa, la depressione è senza utilità
Dyson, Freeman J.
|
Asp.net
Home >Asp.net > Web controls and C# Sharp (Part II)
Web formAs the user is required to insert a new book, the page has to provide a form and some input field.We are going to use an Asp.Net Web Control that basically provides:
A web form is an Asp.Net technology to develop rapidly user interfaces. When the page is requested the .Net Framework engine produces an html and JavaScript code, tags and commands such as: text and button input or Onclick events, etc. Indeed, web form and web controls are objects of .Net Framework installed on the web server, usually Microsoft IIS and then they are Runat=server. Let's see the whole code for the web control:
<form id="myform" runat="server" >
<strong>Title:*<br /></strong></form> As you can see, some html is incapsulated in the web form. Let's focus on some of the main properties of these web controls. The TextBox control prints on video a textbox input field and identified the inputed value by an id. <asp:TextBox id="title" Runat= "server"/> The RequiredFieldValidator control provides validation of mandatory field, the property ControlToValidate identified by id the mandatory field. The property ErrorMessage prints the message when the filed is left empty. <asp:RequiredFieldValidator id="rfvname" ControlToValidate="title" ErrorMessage="*Mandatory" Font-Bold= "True" Runat="server" /> As you see the default font color is red: ![]() The CompareValidator control provides logical validation of input data. When the property EnableClientScript is set true, the Asp.net engine generates client code (JavaScript) so the validation is executed without send to the server another request. In our example, we think that for our hypothetical user appreciates time saving controls, we test positively the page with some browser non Microsoft (as Firefox), and then we decide to keep true this property... The property Type declares the type of data allowed, in fact for the field price is Integer. The property Operator if is set to DataTypeCheck to check the type of input data is conformant with the type declared. <asp: CompareValidator id="Compare2" ControlToValidate="price" EnableClientScript="True" Type="Currency" Operator="DataTypeCheck" ErrorMessage="Incorrect type" Font-Bold= "True" runat="server"/> No doubt, the property ErrorMessage prints the message when the filed is left empty: ![]() The Button control is the last element in our form. It prints the button that, if pressed, (event <asp:Button id="LinksPost" Text="Save data" OnClick="btnAddBook_Click" Runat="server" /> The output of this web form looks something like this: ![]() Setting the Sql statement after the button click eventThe function btnAddBook_Click()'duty is retrieve data from the web form, composing the insert sql statement and pass this string to the function ExecuteSqlCommand() that actually inserts the new row in the table.As mentioned above, the function btnAddBook_Click() is activated by the button at the end of the web form.
private void btnAddBook_Click(object sender, System.EventArgs e)
{ // Declaring variables} Executing a non query statementA frequent solution to execute insert,delete,update command is developing a function good for any of this type sql statement.So it is time for ExecuteSqlCommand()function 's code:
// ExecuteNonQuery for insert, delete, update sql command
private void ExecuteSqlCommand(string sql) { OleDbConnection conn = null; Now, it up to you developing further this script ... enjoying your programming! Downloads: bookstore.zip ( 12 KB) ![]() Warning: include(ads/text468x15.html): failed to open stream: No such file or directory in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Warning: include(): Failed opening 'ads/text468x15.html' for inclusion (include_path='.;C:\php\pear') in D:\inetpub\webs\fishscriptcom\documents\view_document.php on line 131 Tutorial ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Script ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Esercizi ![]() ![]() ![]() Comandi ![]() ![]() ![]() |
Cerca
Asp.net...
Info:
Esecuzione di una pagina aspx
Il web è un giovane media: infatti ha solo 10 anni di età.
Si pensi alla televisione o al cinema all'età di 10 anni. A quei tempi questi media erano primitivi, ancora alla ricerca della loro strada.
Venivano esplorati i limiti della nuova tecnologia, ma grandi progressi dovevano ancora essere raggiunti.
Oggi, i professionisti del web si trovano nella stessa fase. Sono pionieri che stanno ancora esplorando i limiti del nuovo media. Senza dubbio, i nostri nipoti, quando vedranno quello che abbiamo fatto pensaranno a qualcosa di elementare.
C'è ancora molto da scopire su quello che il Web può fare e suo come può essere utilizzato.
Jason Foss
Il web è un giovane media: infatti ha solo 10 anni di età.
Si pensi alla televisione o al cinema all'età di 10 anni. A quei tempi questi media erano primitivi, ancora alla ricerca della loro strada.
Venivano esplorati i limiti della nuova tecnologia, ma grandi progressi dovevano ancora essere raggiunti.
Oggi, i professionisti del web si trovano nella stessa fase. Sono pionieri che stanno ancora esplorando i limiti del nuovo media. Senza dubbio, i nostri nipoti, quando vedranno quello che abbiamo fatto pensaranno a qualcosa di elementare.
C'è ancora molto da scopire su quello che il Web può fare e suo come può essere utilizzato.
Jason Foss
Asp.net...
Info:
Esecuzione di una pagina aspx
Oracle...
Definizioni:
Scalar Subquery
Shell scripting...
Script:
Array in do while construct
fishScript.Com is accessible by Mobile access technology
as mobile phones, Palm and Pocket PC .
Nicoleta e Marco Magnani tutorial, examples, courses, esempi, corsi, esercizi, appunti vari Dottoressa Nicoleta Dragu Formatrice Docente Insegnante Mediatrice Culturale Dott. Marco Magnani Universita La Sapienza Roma Master Computer Science Hunter College New York , Data Base Administrator DBA oracle System architect |