Skip to main content

Posts

Showing posts from November, 2008

Javascript code to show the Remaining character in the text box!

Include the below javascript method in a javascript File. function CheckLength(fn,lb,rm,mc) { var len=document.getElementById(fn).value.length; if (len > mc) { var fn1=document.getElementById(fn).value.substring(0,mc); document.getElementById(fn).value= fn1; len = mc; } else { if(fn) var rLen=mc-len; document.getElementById(lb).innerHTML=rm + rLen; } } In .aspx Page write the line to include the method from a file to page Now Suppose this method is implemented on a text box Place the two labels below the textbox string Strrm = "Remaining character: "; Now call this method on the keyup and keydown events on the textbox txtTask.Attributes.Add("onkeyup", "CheckLength('" + txtTask.ClientID + "','" + lblramaining.ClientID + "','" + Strrm + "',500);hidelabel('...

Enabling Database Mail on SQL Server Express !

By Default ,in Sql Server express ,we donot send the mails .because it have some files missing in it.It we copy that missing files in the MSSQL\Bin directory .These three files that are necessary to send mail from Sql server are--- 1)DatabaseMail90.exe 2)DatabaseMailEngine.dll 3)DataBaseMailProtocols.dll Then Execute the following Commands USE Master GO sp_configure 'show advanced options', 1 GO reconfigure with override GO sp_configure 'Database Mail XPs', 1 GO reconfigure GO sp_configure 'show advanced options', 0 GO use msdb dbo.sysmail_start_sp How To make Profile in SqlServer EXECUTE msdb.dbo.sysmail_add_profile_sp @profile_name = 'Manpreet_Profile', @description = 'Manpreet'