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 [...]
Archive for January, 2008
Multi language supported web site in ASP.NET
Posted in C#.NET, tagged C#.net, Multi language on January 17, 2008 | 21 Comments »
Send mail using ASP.NET
Posted in C#.NET, tagged ASP.NET, IIS, mail, smtp on January 17, 2008 | 6 Comments »
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 [...]
Mailbox unavailable. The server response was: 5.7.1 Unable to relay sendername
Posted in General, tagged IIS, smtp on January 17, 2008 | 2 Comments »
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 [...]
State Management in ASP and ASP.NET
Posted in C#.NET, tagged ASP, ASP.NET, session on January 11, 2008 | Leave a Comment »
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 [...]
Problem opening Database Diagram in SQL Server Management Studio Express
Posted in SQL Server, tagged SQL Server on January 7, 2008 | Leave a Comment »
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
Video tutorial on Microsoft Expression Blend
Posted in Silverlight, tagged Silverlight on January 7, 2008 | Leave a Comment »
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
Tools for Detecting IE Memory Leaks
Posted in Test Tools on January 7, 2008 | Leave a Comment »
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 [...]
Create a button run time
Posted in VB.NET, tagged vb.net on January 7, 2008 | Comments Off
‘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
Upload file using c#.net
Posted in C#.NET, tagged C#.net, Programming on January 6, 2008 | 1 Comment »
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;
}

