Category

September 13, 2011

In category: ASP.Net, Web Development | Posted by sanman

Recently, I was working on a project as a web developer where I used webservies to get and update data between Siebel and .NET. The problem working on two systems,...

August 2, 2010

In category: ASP.Net, Web Development | Posted by sanman

String bday = “06/20/2010”; DateTime ukDateFormat = DateTime.Parse(bday, System.Globalization.CultureInfo.GetCultureInfo(“en-us”)); Response.Write(ukDateFormat);

July 14, 2009

In category: ASP.Net, Web Development | Posted by sanman

I was working on a project and have been asked to convert the webpage into a pdf document. I have found a solution in a forum, but it was in...

November 26, 2008

In category: Achievements, ASP.Net, Web Development | Posted by sanman

If you are writing a program to send a mail with an attachment, then you might come across the problem with some random ATTXXXXX.dat file.if you you don’t attach a...

November 26, 2008

In category: Achievements, ASP.Net, Web Development | Posted by sanman

I found a nice article about how to send emails using System.Net.Mail on asp.net forums. Have a look at asp.net forum

November 26, 2008

In category: Achievements, ASP.Net, Web Development | Posted by sanman

I found a nice article about how to send emails using System.Net.Mail on asp.net forums. Click the following link to access the page asp.net forum

November 26, 2008

In category: Achievements, ASP.Net, Web Development | Posted by sanman

This code should be in yourfilename.aspx.vb . Const maxFileSize As Integer = 1048576 Dim intDocFileLength As Integer = Me.AttachmentFile.PostedFile.ContentLength If intDocFileLength > maxFileSize Then Label1.Text = “File size exceeds the...

November 26, 2008

In category: ASP.Net, Project, Web Development | Posted by sanman

If you want to filter the filetype in a fileupload control: < asp:FileUpload ID="AttachmentFile" runat="server" Width="240px" style="background-color: #FFF0E1" /> < asp:RegularExpressionValidator id="FileUpLoadValidator" runat="server" ErrorMessage="Th file type is not allowed." ValidationExpression="^.+(.doc|.DOC|.pdf|.PDF)$"...

November 26, 2008

In category: Achievements, ASP.Net, Project, Web Development | Posted by sanman

If you want to limit the number of characters in a text field use the code below: < asp:TextBox runat="server" ID="Body" TextMode="MultiLine" MaxLength="5" Columns="55" Rows="10" BackColor="#FFCC99" Width="346px" style="background-color: #FFF0E1"> <...

November 26, 2008

In category: ASP.Net, Project, Web Development | Posted by sanman

How to use the ‘RegularExpressionValidator‘ and ‘RequiredFieldValidator‘ in ASP.NET: I have used these to validate an email address. see the code below: < asp:TextBox runat="server" ID="Email" Columns="30"> < asp:RequiredFieldValidator ID="EmailValidator"...

November 26, 2008

In category: Achievements, ASP.Net | Posted by sanman

* I have used VB in this demonstration. If you want to handle the error for the whole application in ASP.NET, you could use the global.asax. Put the below code...