read the following link
http://www.asp.net/learn/whitepapers/aspnet40/
Archive for the ‘asp.net 1.1’ Category
whats new in asp.net 4.0
Posted in .net framework 2, asp.net 1.1, asp.net 2, c# on June 26, 2009 | Leave a Comment »
How to get month date view between two dates in c#
Posted in .net framework 2, asp.net 1.1, asp.net 2, c# on March 24, 2009 | Leave a Comment »
Scenario I got while developing some application. I required month and year view in drop down list between contract starting and ending date. Like “March 2009” “April 2009” until march 2011 so on.
I handled it as follow
DateTime _LoopDate = “1/1/2009”;
[...]
How to get Month name from current date using c#
Posted in .net framework 2, asp.net 1.1, asp.net 2, c# on March 18, 2009 | 1 Comment »
Hi i found two methods to do so.
Using Globliziation
System.Globalization.DateTimeFormatInfo d = new System.Globalization.DateTimeFormatInfo();
string month = d.MonthNames[DateTime.Now.Month-1];
Using new date object as follow
string MonthName = GetMonthName(DateTime.Now.Month);
static string GetMonthName(int monthNum)
{
return GetMonthName(monthNum, false);
}
static string GetMonthName(int monthNum, bool abbreviate)
{
if (monthNum < 1 || monthNum > 12)
throw new ArgumentOutOfRangeException(“monthNum”);
DateTime date = new DateTime(1, monthNum, 1);
if (abbreviate)
return date.ToString(“MMM”);
else
return date.ToString(“MMMM”);
}
Chears
Export GridView from aspx page to Pdf using iTextSharp in asp.net
Posted in asp.net 1.1, asp.net 2, c# on January 29, 2009 | Leave a Comment »
very helpful link i found on internet http://csharpdotnetfreak.blogspot.com/2008/12/export-gridview-to-pdf-using-itextsharp.html
regular expression for email address validation
Posted in asp.net 1.1, asp.net 2, regular expression on October 20, 2008 | Leave a Comment »
hi use this regular expression for email address validation
^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$
Regular expression validator in asp.net would be like
Chears…
how to get server.mappath in c# class
Posted in .net framework 2, asp.net 1.1, asp.net 2, c# on August 25, 2008 | Leave a Comment »
i face a problem that server.mappath did not available in c# class at my utillity framework at app code folder of one of my asp.net application. While it is available at asp.net page code behind. Because ASP.NET pages contain a default reference to the System.Web namespace (which contains the
HttpContext class), you can reference the members [...]
how to clear controls in asp.net c#
Posted in asp.net 1.1, asp.net 2, c#, tagged asp.net, c#, clear text boxes, textboxes on August 9, 2008 | 2 Comments »
Use following code in you page. At Calling Statement send reference of page “this”. It Clears all text boxes and set all checkboxes on page to false
private void ClearControls(Control parent)
{
foreach (Control _ChildControl in parent.Controls)
{
if ((_ChildControl.Controls.Count > 0))
{
ClearControls(_ChildControl);
}
else
{
if (_ChildControl is TextBox)
{
((TextBox)_ChildControl).Text = string.Empty;
}
else
if (_ChildControl is CheckBox)
{
((CheckBox)_ChildControl).Checked = false;
}
}
}
}
Registering ASP.NET on IIS after installing the .NET Framework
Posted in .net framework 2, asp.net 1.1, asp.net 2, c# on June 6, 2008 | Leave a Comment »
Usually this problem occur when we install iIs after installation of Visual studio or .net framework. For this purpose use aspnet_regiis.exe, it is located under %WindowsDir%\Microsoft.NET\Framework\vx.y.zzzz\ and you should call it with the -i parameter: aspnet_regiis.exe -i
How to remove duplicate from string array in .net
Posted in .net framework 2, asp.net 1.1, asp.net 2, c#, vb.net, tagged .net, duplicate array, vb.net on April 25, 2008 | 7 Comments »
In one case i have to right a method to remove duplication from array of strings.
i write this code
Public Function RemoveDuplicates(ByVal items As String()) As String()
Dim noDupsArrList As New ArrayList()
For i As Integer = 0 To items.Length – 1
[...]
How to filter uploader control using client side script in asp.net
Posted in .net framework 2, Java script, asp.net 1.1, asp.net 2, tagged asp.net 1.1, asp.net 2, c#, javascript on April 8, 2008 | 2 Comments »
For any client side action we have to choose a scripting language to build our logic. Let us go for JavaScript. When use a file control we have to use a button control for doing the uploading action. It is better to refer to Anand’s article CodeSnip: Working with FileUpload Control to get the basic [...]