This is a way for you to access all files in a directory using the FileInfo and DirectoryInfo classes.
string path = @”c:\mydirectory”;
DirectoryInfo myfolder = new DirectoryInfo(path);
FileInfo[] strFiles = myfolder.GetFiles();
foreach (FileInfo myItem in strFiles)
{
myItem.Delete();
// or do whatever you wanna do!
}
hello there,
there are some scenarios where u want to change the mouse pointer to the one that looks like a hand, you know like the one u get when you hover over a link. Sometimes its pretty useful when you’re thinking about making a popup window that would come up when you click on a [...]
well, this is how you can go back to the previous page through Javascript.
javascript:history.go(-1);
Normal view
Today I learned something new in Adobe Photoshop, and that is to measure the exact distance between two objects in a given design. This is very useful for us Web Developers.
Distance Information
All you need to do is to select the area between the two objects. and then click the ‘Info’ tab in [...]
I was told to generate an XML Schema of an SQL Server 2005 Database. And naturally I started googling it out so I found this at a blog given by the URL at the bottom.
Thumbs up to ya my friend!
create table Person
(
Age int not NULL check( Age > 0) ,
Height numeric(10,2) not NULL check( Height [...]
I’m working on a project in which there was an IndexOutOfBound exception coming. We needed to have multiple items selected in the ListBox. It had a table, TemplateMTemplateAttribute , in which there were multiple entries of the template attributes selected. It was actually the TemplateAttributeId that was to be matched with those in [...]
http://www.communitymx.com/content/article.cfm?cid=529B0
http://www.ehow.com/how_2284643_left-right-center-align-css.html
body {
width: 80%;
margin-right: auto;
margin-left: auto;
border: 1px solid black;
}
.container {
position: relative;
height: 50px;
}
.left-element {
position: absolute;
left: 0;
width: 50%;
}
.right-element {
position: absolute;
right: 0;
width: 50%;
text-align: right; /* depends on element width */
}
Download Samples
Truly this is as easy as pie
in web.config file add a node like this in the <appsettings> node
<add key=”dbConnection” value=”
Server=YOUR_SERVER_NAME;User ID=USER_NAME_DB;Password=YOUR_PASSWORD;Initial Catalog=DBNAME;”/>
Now in the code file add the following line whereever u want to get the connection String
string conStr = ConfigurationManager.AppSettings["dbConnection"];
and then do whatever you wanna do with that!
I read this on http://forums.asp.net/t/1137344.aspx
when I was modifying a Global.asax file that had Response.Redirect written in its Session_End Event. I guess the programmer aimed to redirect the application to the error page like this but the fact is that u dont have the Response Object in this particular event, the reason being that it’s fired [...]
Download the code
Hello everyone,
Here I’m going to explain how I managed to implement Custom Paging in my project. It involved an extensive amount of data that was used for searching and I definitely needed a better option than the default paging. In a nutshell, Default paging gets the complete set of records although it needs [...]