adobytescode.blogspot.com
ADO.NET: Anonymous Methods in C# 2.0
http://adobytescode.blogspot.com/2009/02/anonymous-methods-in-c-20.html
Anonymous Methods in C# 2.0. C# 20 (and .NET in general) introduces the anonymous method. An anonymous method can be used anywhere a delegate is used and is defined inline, without a method name, with optional parameters and a method body.To use anonymous methods, you need to know what a delegate is. Anonymous Methods Are Inline Delegates. Private void Form1 Load(object sender, EventArgs e). Button1.Click = delegate. Anonymous methods can be used wherever delegates are expected. Anonymous methods can...
aspbytes.blogspot.com
ASP.NET: xml-11
http://aspbytes.blogspot.com/2008/02/xml-11.html
Copy1)Explain what a DiffGram is, and a good use for one? Answer : A DiffGram is an XML format that is used to identify current and original versions of data elements. When sending and retrieving a DataSet from an XML Web service, the DiffGram format is implicitly used. The DiffGram format is divided into three sections: the current data, the original (or “before”) data, and an errors section, as shown in the following example. Xmlns:xsd=”http:/ www.w3.org/2001/XMLSchema”. Template images by Alitangi.
aspbytes.blogspot.com
ASP.NET: Integer validation
http://aspbytes.blogspot.com/2008/06/integer-validation.html
Here field is textbox where user enters value. Var valid = "0123456789". Var ok = "yes";. For (var i=0; i. Temp = " field.value.substring(i, i 1);. If (valid.indexOf(temp) = "-1"). Ok = "no";. If (ok = "no"). Only numbers are accepted! Subscribe to: Post Comments (Atom). Template images by Alitangi.
aspbytes.blogspot.com
ASP.NET: Reading CSV and Bind to GridView
http://aspbytes.blogspot.com/2010/09/reading-csv-and-bind-to-gridview.html
Reading CSV and Bind to GridView. String strPath = @"Path of the file";. String.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};. Extended Properties=" text;HDR=Yes;FMT=Delimited" ;". String CommandText = string.Format(@"SELECT * FROM Nameofthefile.csv", ConnectionString);. DataSet CSVDataSet = new DataSet();. OleDbConnection CSVConnection = new OleDbConnection(ConnectionString);. OleDbDataAdapter CSVAdapter = new OleDbDataAdapter(CommandText, CSVConnection);. GVcsvDataSource = CSVDataSet;.
aspbytes.blogspot.com
ASP.NET: Email Validation
http://aspbytes.blogspot.com/2008/06/email-validation.html
Here str is textbox where user enters email id. If (str.indexOf(at)= -1). If (str.indexOf(at)= -1 str.indexOf(at)= 0 str.indexOf(at)= lstr). If (str.indexOf(dot)= -1 str.indexOf(dot)= 0 str.indexOf(dot)= (lstr-1). If (str.indexOf(at,(lat 1)! If (str.substring(lat-1,lat)= dot str.substring(lat 1,lat 2)= dot). If (str.indexOf(dot,(lat 2) = -1). If (str.indexOf(" ")! Subscribe to: Post Comments (Atom). Template images by Alitangi.
dotnetpages.blogspot.com
Dot Net Pages: How to handle errors in SQL-SERVER {try…catch}
http://dotnetpages.blogspot.com/2012/11/how-to-handle-errors-in-sql-server.html
How to handle errors in SQL-SERVER {try…catch}. To implement error handling in your stored procedure in SQL-Server, we can user try…. catch syntax. To retrieve error information below are the built in functions in SQL-Server. Returns the number of the error. Returns the error state number. Returns the name of the stored procedure or trigger where the error occurred. Returns the line number inside the routine that caused the error. SELECT ERROR NUMBER() AS ErrorNumber ,. ERROR SEVERITY() AS ErrorSeverity ,.
aspbytes.blogspot.com
ASP.NET: Tracing Overview-3
http://aspbytes.blogspot.com/2007/12/tracing-overview-3.html
To enable tracing for a page, include the following directive at the top of the page code:. Trace statements can also be organized by category, using the TraceMode attribute of the Page directive. If no TraceMode attribute is defined, the default value is SortByTime. The attributes supported in the trace configuration section are listed in the table below:. Enabled .Set to true false, indicates whether Tracing is enabled for the application (default is false). Labels: Tracing and debugging.
adobytescode.blogspot.com
ADO.NET: SQL Server
http://adobytescode.blogspot.com/search/label/SQL%20Server
Showing posts with label SQL Server. Showing posts with label SQL Server. CREATE DATABASECREATE DATABASE database nameCREATE DATABASECREATE DATABASE database name. ON { [PRIMARY](NAME = logical name,FILENAME ='physical name'[,SIZE = size][,MAXSIZE = max size UNLIMITED][,FILEGROWTH = growth increment])}[,.n] [LOG ON{(NAME = logical name,FILENAME = 'physical name'[,SIZE=size UNLIMITED][,MAXSIZE = max size UNLIMITED][,FILEGROWTH = growth increment])}[,.n] [FOR LOAD FOR ATTACH]. CREATE TABLE table name.