Its
Ctrl + Alt + End
Wednesday, May 28, 2008
Tuesday, May 27, 2008
Webservice and Dynamic Web URL
1. Add a webreference to the webservice.
2. In properties window select dynamic for the webreference
3. Create an object of the webservice class.
4. The created object has a propery called "Url".
5. Assign the desired url to this Url property in code.
Fin.
2. In properties window select dynamic for the webreference
3. Create an object of the webservice class.
4. The created object has a propery called "Url".
5. Assign the desired url to this Url property in code.
Fin.
FileUpload Control
The FileUpload control in .Net 2.0 is rendered in browser as
html input="file"
One drawback of this control is that, if we look into the OpenFileDialog and OpenSaveDialog there will be filter. Filters allows us to display particular
file type. But in FileUpload control we don't have this filter option.
One way to get rid of this is using Regular Expression Validator.
We can use the following regular expression.
"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.csv|.CSV|.xls|.XLS|.xlsx|.XLSX)$"
Now in server side we can upload the file using
FileUpload.SaveAs() method.
We can get the current path using the Server.MapPath method
string filepath = Server.MapPath("tempcsv");
fileUploadCSV.SaveAs(fileName);
done.
html input="file"
One drawback of this control is that, if we look into the OpenFileDialog and OpenSaveDialog there will be filter. Filters allows us to display particular
file type. But in FileUpload control we don't have this filter option.
One way to get rid of this is using Regular Expression Validator.
We can use the following regular expression.
"^(([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w[\w].*))(.csv|.CSV|.xls|.XLS|.xlsx|.XLSX)$"
Now in server side we can upload the file using
FileUpload.SaveAs() method.
We can get the current path using the Server.MapPath method
string filepath = Server.MapPath("tempcsv");
fileUploadCSV.SaveAs(fileName);
done.
Sunday, May 25, 2008
Eliminating horizontal scroll on pop up
To eliminate horizontal scroll, you can use the following CSS styles.
body {overflow-y:auto;}
body,html {_overflow-x:hidden;}
body {overflow-y:auto;}
body,html {_overflow-x:hidden;}
Subscribe to:
Posts (Atom)