Archive

Archive for the ‘Others’ Category

google map help

October 18, 2010 Leave a comment
Categories: Others

Getting all asp.net controls dynamically

March 14, 2010 Leave a comment

Please check this link

http://forums.asp.net/p/1518054/3638886.aspx

Categories: Others

File control content check using javascript from CS Code

March 9, 2010 Leave a comment

Write this code in your cs page on page_load event
protected void Page_Load(object sender, EventArgs e)
{
btnUpload.Attributes.Add(“onclick”, “return validateFileContect(document.getElementById(‘” + fileUpload.ClientID + “‘));”);

}

and after that add the following script in ur aspx page

function validateFileContect(obj){
var fileName = new String();
var fileExtension = new String();

// store the file name into the variable
fileName = obj.value;

// extract and store the file extension into another variable
fileExtension = fileName.substr(fileName.length – 3, 3);

// array of allowed file type extensions
var validFileExtensions = new Array(“jpg”, “png”, “gif”);

var flag = false;

// loop over the valid file extensions to compare them with uploaded file
for(var index = 0; index < validFileExtensions.length; index++){
if(fileExtension.toLowerCase() == validFileExtensions[index].toString().toLowerCase()){
flag = true;
}
}

// display the alert message box according to the flag value
if(flag == false){
alert(‘Your image is not uploaded.Only JPG,GIF,PNG images are allowed.’)
return false;
}
else{

return true;
}
}

Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

March 6, 2010 Leave a comment

Your this problem can be solved by removing your try catch block. i had face the same problem but after removing try catch block my problem has been fixed.

Iframe tooltip using javascript

February 4, 2010 Leave a comment

http://www.dhtmlgoodies.com/scripts/form-field-tooltip/form-field-tooltip.html

Categories: Others Tags: , ,
Follow

Get every new post delivered to your Inbox.