| 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:
Query to unlock all locked users
Unix...
Tip:
How remove a file named -r
PLSQL...
Script:
dbms_lob inserting a file in a blob type
Asp.net...
Tip:
Un solo web form lato server...
Asp.net...
Faq:
Cosa è un Controllo Server (Server Control)?
Shell scripting...
Script:
Hide user input on screen
Basically, a web session can be defined as the timeframe in which a visitor navigates your web site.
Php Funzione mail()
XPath is a language for addressing parts of an XML document.
It is designed to be used by XSLT and XPointer.
Basically, a web session can be defined as the timeframe in which a visitor navigates your web site.
|
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 Costanti
[C#]
Enum
[C#]
Array
dichiarazione, inizializzazione, stampa
[C#]
Array
caricamento e stampa attraverso un ciclo for
[C#]
Array bidimensionali rettangolari
inizialiazzazione e stampa
[C#]
Oggetti (Object)
valorizzati con ArrayList, Double, string, proprietà GetType
[C#]
ArrayList
proprietà count, metodo Add, Remove
[C#]
Jagged array
dichiarazione e inizializzazione
[C#]
Proprietà
validare il dato attraverso le proprieta
[C#]
Overloading
creare metodi con lo stesso nome e diverse implementazioni
[C#]
Programma di cassa da console
Tutorial per illustrare l'applicazione di costrutti fondamentali di programmazione come variabili, funzioni condizionali if/then Select/case, cicli, funzioni, oggetti ArrayList Funzioni principali e secondari
[Visual basic.net]
Array
stampa attraverso costrutto for/each
[C#]
Web controls and C# Sharp (Part II)
Saving data in an Access database using a web form
[Asp.net]
Datagrid
Delevoping a simple and quick datagrid to publish query's results
[Asp.net]
Impostare variabili d’ambiente con .NET Framework 1.1
[C#]
Script Controlli e validazione
[Asp.net]
If Then
Costrutti fondamentali
[Visual basic.net]
Importazione dei namespace
Regole sintattiche: importazione delle classi
[Visual basic.net]
Costrutto If Then Else
Costrutti fondamentali
[Visual basic.net]
Gestione degli errori 1
Iniziare a gestire errori e eccezioni
[Visual basic.net]
Gestione degli errori 2 Dimostrazione
[Visual basic.net]
Gestione istruzioni condizionali
Costrutto Select/case (Esempio Applicazione da Console)
[Visual basic.net]
HelloWorld!
Iniziare con Visual Basic .Net
[Visual basic.net]
Intercettare Input da Console
Semplice esempio iterazione con l'utente
[Visual basic.net]
Semplice programma da "console"
Iniziare con Visual Basic .Net
[Visual basic.net]
Leggere Input da Console
Iniziare con Visual Basic .Net
[Visual basic.net]
Lettura di un file di testo
Operazioni sul file system: stream di un file e lettura del suo contenuto
[Visual basic.net]
Lettura di un file Xml con l'oggetto XmlTextReader
Parsing di file Xml attraverso i metodi dell'oggetto XmlTextReader
[Visual basic.net]
Oggetto Date
Stampare la data odierna
[Visual basic.net]
Overloading accesso ad una funzione a secondo del tipo di valore
Concetti di base
[Visual basic.net]
Esercizi Disegna alcuni tra i più utilizzati controlli di una form
Costruire e compilare un form con il Designer di Visual Basic
[Visual basic.net]
Cicli e operazioni su filesystem
Attraverso un ciclo while creare quattro file .txt denominati 4 e i suoi quadrati (4.txt,16.txt,128.txt,2048.txt)
[Visual basic.net]
File System
Data una cartella esegue un copia di tutti i file ivi contenuti
[Visual basic.net]
Comandi Ricavare nome e percorso di un'applicazione
[C#]
Postgres database uptime
Last time database has been started (or restarted)
[.Net]
|
Cerca
Asp.net...
Info:
Esecuzione di una pagina aspx
A good scientist is a person with original ideas.
A good engineer is a person who makes a design that works with as few original ideas as possible. There are no prima donnas in engineering. Freeman Dyson A good scientist is a person with original ideas.
A good engineer is a person who makes a design that works with as few original ideas as possible. There are no prima donnas in engineering. Freeman Dyson
Asp.net...
Info:
Esecuzione di una pagina aspx
Oracle...
Definizioni:
Area PGA
Shell scripting...
Script:
Script for archiving and compressing folder and file
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 | ||