Formatting columns in a GridView is relatively straightforward, once you know the appropriate format string.
Here are the steps if you are using Expression Web, Visual Studio, or Visual Web Developer:
-
Open the Task Pane of your GridView and select Edit Columns
-
In the Selected Fields Box, select the column you want to edit
-
Find the HTMLEncode property and set it to false.
-
Find the DataFormatString property and set it to the appropriate formatstring. The standard format of a format string is {0:format string}
Some examples of format strings are:
{0:c} to format as currency
{0:M-dd-yyyy} to format as a date
For more formatting strings, go to Formatting Types.
Every term I have to create between 100 and 200 web sites for students in my classes. Here are the steps I use to create those site in IIS 6. The student's active directory accounts are already set up by our system administrator. I use FrontPage Server Extensions to allow students to transfer files to the server. Sections in italics below need to be replaced with your settings.
1. Create Directories:
md studentdirectory
2. Assign the student user account relevant permissions:
xcacls studentdirectory /T /E /G studentusername:F
3. Create a virtual directory in IIS for each student:
iisvdir /create "IISsitename" studentvirtualdirectoryname studentdirectory
4. Create a subweb for each student:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\50\bin\owsadm" -o install -p 1100 -w studentvirtualdirectoryname -u usernameWithSufficientPermissionsOnServer
5. Give the new subweb unique permissions:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\50\bin\owsadm" -o setperms -p 1100 -w studentsubwebname -i false -u usernameWithSufficientPermissionsOnServer
6. Give the student the author role on the subweb:
"C:\Program Files\Common Files\Microsoft Shared\web server extensions\50\bin\owsadm" -o roleusers -command add -u studentusername -p 1100 -w studentsubwebname -name Author
There is a useful add-on for Internet Explorer 7 that lets you mimic Firefox's search behavior. Read more about it and download it from this address:
http://www.windowsmarketplace.com/details.aspx?view=info&itemid=3012162#productSpecs