Feeds:
Posts
Comments

Archive for January, 2008

It is easy to develop multi language supported web site using ASP.NET . Just follw that step by step.
1.Take a new web site
2.Add “App_GlobalResources” from ASP.NET folders
3.Take a *.resx file (Strings.resx)
4.Enter Name and values
5.Make different *.resx file for different languages and name like that  Strings.en-US.resx (for US english), Strings.fr-FR.resx (for French). Make as many language [...]

Read Full Post »

Send mail using ASP.NET

To send mail from .net 2 classes are available in System.Net.Mail. Classes are MailMessage and SmtpClient . But before coding need to check if Microsoft SMTP service is turned on and prepare to send mail. 

Setup SMTP Server: Open Internet Services Manager directly or open Computer Management and Navigate to Internet Information Services -> Default SMTP [...]

Read Full Post »

i written a simple code
SmtpClient smtp = new SmtpClient(“localhost”);
smtp.Send(“from@testserver.com”, “to@testrserver.com”, “Test mail subject”, “Test mail body”);
but got exception “Mailbox unavailable. The server response was: 5.7.1 Unable to relay to@servername.com.”.  Problem is not in the code problem is in the configuration of localhost. It considers itself being used as a mail relay and by default it [...]

Read Full Post »

In Distributed network architecture ASP has only one Type of Session Management which can be expressed as In-Process Session State.
In .NET architecture ASP.NET Session Management can be done is different ways as
 1.InProc Session Management (Both application and session run under the Same Process)
 2.StateServer Session Management (application and the session run in different processes)
 3.SqlServer Session Management [...]

Read Full Post »

There two type of cookies in ASP.NET
Persistent cookies:  cookies are stored on your computer hard disk.  They stay on your hard disk and can be accessed by web servers until they are deleted or have expired. 
public void SetPersistentCookies(string name, string value){
 HttpCookie cookie = new HttpCookie(name);
 cookie.Value = value;
 cookie.Expires = Convert.ToDateTime(“12/12/2008″);
 Response.Cookies.Add(cookie);}
Non-persistent cookies: cookies are saved only while [...]

Read Full Post »

I had a dastabase restored from anohter PC. Now when I database open database I am getting tables available in the database but when i click on database diagram it gives me error.
 
I have got a good solution in technet. Please go through the link to getsolve the problem
http://technet.microsoft.com/en-us/library/ms189279.aspx

Read Full Post »

To introduce Microsoft Expression Blend need to go for some video tutorial. Here are some introduction video tutorial for Expression Blend
1. Video tutorial 1
2. Video tutorial 2
3. Video tutorial 3

Read Full Post »

As a web developer you may need to find memory leaks in IE specially in IE6. Sometime we may face memory leaks problem for circular references. These circular reference are in between Javascript Objec and  object within DOM (Document Object Model).  Have got 2 tools which can detect memory leaks and give DOM tree with [...]

Read Full Post »

Create a button run time

‘Create the button
Dim btn As New Button()
‘Specify the location and the size
btn.Location = New System.Drawing.Point(200, 30)
btn.Size = New System.Drawing.Size(100, 20)
btn.Text = “New Button”
‘Add it to the forms control collection
Me.Controls.Add(btn)
‘Link the event to the event handler
AddHandler btn.Click, AddressOf Me.ClickButton

Read Full Post »

Upload file using c#.net

HTML Code
<form id=”frmFileUpload” runat=”server” enctype=”multipart/form-data”>
Upload File:<input id=”fileUpload”  type=”file” runat=”server”  size=”25″/>
<asp:Button ID=”btnUpload” runat=”server” Text=”Upload” onclick=”btnUpload_Click” />
</form>
C# code
public void uploadFile()
{
 if (null != fileUpload.PostedFile)
 {
  HttpPostedFile file = fileUpload.PostedFile;
  if (file.FileName != “”)
  {
   string filename = GetFileName(file);
   file.SaveAs(Server.MapPath(@”Upload” + filename));
  }
 }
}
private string GetFileName(HttpPostedFile file)
{
 int i=0, j=0;
 string filename;
 filename = file.FileName;
 do
 {
  i = filename.IndexOf(@””,j+1);
  if (i>=0) j=i;
 } while (i>=0);
 filename = filename.Substring(j+1,filename.Length-j-1);
 return filename;
}

Read Full Post »

Older Posts »