Make A control Read Only:-

Public Shared Function MakeControlReadOnly(ParamArray ControlIds As String()) As String
Dim sb As System.Text.StringBuilder = New StringBuilder(400)
sb.Append(" ")
Return sb.ToString()
End Function


2.Method To validate Email ID With the Help of Regular Expression.
Ans:-javascript
function check for valid email address
function IsvalidEmail(src)
{
var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";
var regex = new RegExp(emailReg);
return regex.test(src);
}

3.Remove White Space from Start and From End
Ans:-TrimString=function(str)
{
str = this != window? this : str;
return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
}

4:Create Folder And Sub Folder at Run Time
Ans:-Public Shared Sub FolderCreation(page As Page)
'variable declaration
Dim serverPath As String = Nothing
Dim virtualServerPath As String = Nothing
Dim parentDir As DirectoryInfo = Nothing
Dim childDir As DirectoryInfo = Nothing
Try
'getting full server path
serverPath = page.Server.MapPath(".")
'server path -1 step
virtualServerPath = serverPath.Substring(0, serverPath.LastIndexOf("\"))
virtualServerPath = virtualServerPath + "\MyFolder\Parent"

'create the directory with the name Parent in MyFolder
parentDir = Directory.CreateDirectory(virtualServerPath)

'Create Child Directory inside Parent folder
childDir = parentDir.CreateSubdirectory("Child")
Catch
End Try
End Sub

5:-Find Age Using jscript
Ans:-< html xmlns="http://www.w3.org/1999/xhtml" >
< head runat="server" >
< title > Viresh Rajput< /title >
< script >
function test1()
{
var tdate=new Date()
var cud=tdate.getDate()
var cum=tdate.getMonth()
var cuyr=tdate.getFullYear()
var pr=document.getElementById("txtdob").value;
var pryr=pr.split("/")
var cuage=cuyr-pryr[2];
alert("Your age : "+ cuage);
}
< /script >
< /head >