Wednesday, April 22, 2009

Showing Invalid file name if brows file FileToUpload in ASP.Net

Problem :
I am using the ipFileToUpload control in ASP.Net to File To Upload .
i have given the ValidationExpression for .gif, .Pdf, etc.....

if i am browsing the application in IE7 it is working.
But It is not working in IE8 and safari.


Solution :

Issue is with your ValidationExpression. So just paste this bellow bold line in ValidationExpression ..... see it will work on all the browser..

ValidationExpression="^.+\.((gif)|(GIF)|(jpeg)|(JPEG)|(tif)|(TIF)|(jpg)|(JPG)|(bmp)|(BMP)|(txt)|(TXT)|(doc)|(DOC)|(xls)|(XLS)|(rtf)|(RTF)|(pdf)|(PDF))$"

Friday, January 30, 2009

To Stop the user to click Web Browser back Button in ASP.Net

Hi... You have the issue like , In your web application you want to stop the user to to click on back button in browser, i mean to say if user click on back button of browser, the browser should not go back. Am I right ? Solution is ...