Surendra Sharma

Surendra Sharma

Search This Blog

Wednesday, May 5, 2010

Accessing Web site in IIS

Hi you won't be able to access your machine by using localhost. Localhost points to your local machines standard ip address of 127.0.0.1. To access the webserver on your vista machine you will need to browse to the ip address or machine name of your vista machine. i.e. http://192.168.0.1/ or http://vistamachinename/

Cannot publish the web site using Visual Studio (publish failed)

Display the output window. VS 2008 - View -> Output.

When you publish it will give you all the errors.

Songs for programming concepts

Local variable
Jeena Yahan Marna Yahan,
Iske siva Jana kaahan.

Global variable
Musafir hoon yaaron,
na ghar hai na thikana

The debugger
Jab koi baat bigad jaye
Jab koi mushkil pad jaye
Tum dena saath mera hamnawaz

Grid with line numbers

<columns>


       
<asp:templatecolumn
ID="templatecolumn1"
runat="server"
headertext="Row Number">

<itemtemplate>

<span><%# Container.ItemIndex+1 %></span>

</itemtemplate>

</asp:templatecolumn>

</columns>

Datagrid Sort Example


void
MyDataGrid_Sort(Object sender, DataGridSortCommandEventArgs e) {


    SortField = (string)e.SortExpression;

    BindGrid();

}




DataView dv = new DataView(dt);

dv.Sort = SortField;

return dv;