Over 1400 pages of pure web ASP.NET code, I say my friend, "this is the book that changed me." ASP.NET Unleashed teaches you how to implement the entire .NET v1.x Framework. This book contains the code in VB, but the CD has both C# and VB. I am a C# coder and I did not mind the VB examples one bit.
I came to this book barely able to write one line of C# code, but know I mastered DataGrid's, DataList's, Arrays (sorting and iterating), formatting (strings and dates), System.Text.RegularExpressions class (pattern matching and replace) and Client-Side Validation (Custom, Required Field, ), DataSets (GetXml, GetXmlSchema, WriteXml, ReadXml, ...), DataViews (sorting Asc and Desc), DataTables (insert, delete, Avg, Count, Max, StDev, Sum, define columns, add DataSets data, Var...), DataRelations, DataAdapter, DataReaders, XmlReaders, Creating Text and Binary Files, OleDbConnection, SqlConnection, Uploading Files, Session Variables, Caching objects, Xml Web Services, Compiling VB and C# into dll's, Symmetric Encryption and Asymmetric Encryption (SHA256, SHA384, SHA512, RC2, Rijndael, DES,...), Windows Authentication, Forms Authentication, Web.config (Roles, Authorization, deny users, Authentication, SQL Server connection string, ... ), Mobile Services, Performance Counters, Application Log, GDI+ Generating pictures on the fly (Brushes, Ellipses, Rectangles, Gradients, Save Jpeg or Gif, Drawing over saved pictures, Pies, Draw Lines, Round or SquareBorders, ...), Custom Postbacks with HtmlControls, AdRotators (binding with XML), ... There is plenty more objects and code, I didn't list. The book is no hype or not all talk and all the code is complete baby. Also all the code is on CD, so you do not have to type the code. The book's only flaw is that it does not show you how to bind data to objects (e.g DropDownList, Calendar, ...) inside of DataGrid's and DataList's using TemplateColumn(s), use custom JavaScript to validate, but the book only shows Microsoft's Control Validaters and the examples do not separate the VB and C# source file from the ASPX file, but by far this is "IT" the book to learn ASP.NET web apps. The book also does not show you how write Crystal Reports.
//The book does not show how to populate data into a DataGrid's object or use JavaScript triggers for validation, but here is my code snip function Validate(name, num, tname){ var regInt=/^-[0-9]+$|^[0-9]+$/; //no decimals if (document.getElementById(name).value == ''){ document.getElementById(name).style.color='White'; document.getElementById(name).style.background='Red'; document.getElementById('lblError').innerHTML='Cannot be empty'; btnDisable(name, tname); } else if (num == 'I' && regInt.test(document.getElementById(name).value) == false){ document.getElementById(name).style.color='White'; document.getElementById(name).style.background='Red'; document.getElementById('lblError').innerHTML='Integers only'; //document.getElementById(name).select(); btnDisable(name, tname); }
< asp : datagrid id="dgrCart" OnItemCommand="ItemsGrid_Command" > < Columns> < asp : TemplateColumn HeaderText="Quantity"> < ItemTemplate> < asp : TextBox id="txtQty" tooltip="sdf" onKeyup="validate(this.id, 'txtQty')" Width="200px" Text=' < %# DataBinder.Eval(Container.DataItem, "QUANTITY" ) % > ' runat="server" />
asp : TemplateColumn> < asp : TemplateColumn HeaderText="States"> < ItemTemplate > < asp : DropDownList id="ddlSt" runat="server" style="width:100%" DataSource="< % # popState() % > " DataTextField="STATENAME" DataValueField="STATE" SelectedIndex=' < % # GetSelectedState((string)DataBinder.Eval(Container.DataItem, "SHIPSTATE")) % > ' onchange="Validate(this.id, 'S', 'ddlSt')" onfocus="STfocus(this.id)" /> ItemTemplate > Columns > asp : datagrid >
public int GetSelectedState(string state){ int i=0; try{ i = dvState.Find(state); return i; } catch {} return i; } public DataView popState(){ try{ DataSet ds = new DataSet(); ds.ReadXml(MapPath(@"\XMLDocs\State.xml")); dvState=ds.Tables["STATE"].DefaultView; dvState.Sort="STATE"; return dvState; } catch (Exception ex){ Response.Write(ex+"");} return dvState; }
The Oracle Data Provider for .NET driver (free) at "www . otn . oracle . com" can be used in the examples of the ASP.NET Unleashed book by replacing the SQL Server namespace "System.Data.SqlClient" with Oracle namespace "Oracle.DataAccess.Client" and replacing the Sql syntax with Oracle (e.g. SqlConnection becomes OracleConnection("User Id=schema_name;Password=schema_password;Data Source=oracle_sid_name"); ) The Oracle 10g Release 2 Database can be downloaded for free too "www . otn . oracle .com"
I also recommend learning Oracle PL/SQL Programming by Scott Urman ISBN 0-07-2191147-3. Also do not bother learning JSP, PHP, or Java Applets. Microsoft ASP.NET Framework is lighter, quicker, less code (for more action), more responsive, and is generations ahead of the pack. |