Sunday, 16 December 2012

DataControls Auto Row Increment


 Gridview
  
<%# Container.DataItemIndex + 1 %>

DataGrid

<%# Container.DataSetIndex + 1 %>


 Repeater

<%# Container.ItemIndex + 1 %>

Data List

<%# Container.ItemIndex + 1 %>

Tuesday, 20 November 2012

Adding logo in Browser Tab

 Add the below line in head tags of your web page
<link rel="icon" href="../images/image.jpg" type="image/png" />

Monday, 9 July 2012

Go to Page Top


function fnPageTop() {
    $("html, body").animate({ scrollTop: 0 }, "slow");
    return false;
}

Wednesday, 20 June 2012

Bind DDL In Design page

<asp:DropDownList ID="ddlScreen" runat="server" CssClass="ddlOVT" DataSourceID="SQLDSScreen"
                                DataTextField="ScreenName" DataValueField="ScreenID" OnDataBound="ddlScreen_DataBound"
                                AutoPostBack="true" OnSelectedIndexChanged="ddlScreen_SelectedIndexChanged">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SQLDSScreen" runat="server" ConnectionString="<%$ ConnectionStrings:SheetPlusConnectionString %>"
                                SelectCommand="SELECT [ScreenID], [ScreenName] FROM [t_SP_Screen] ORDER BY [OrderLevel]">
                            </asp:SqlDataSource>

Monday, 21 May 2012

Thursday, 17 May 2012

Query to see the changed SP or table name

select name,modify_date from sys.tables order by modify_date desc
select name,modify_date from sys.procedures order by modify_date desc

Monday, 14 May 2012

Adding content to the Ajax HTML Editor on load this comes with new line .



        <he:Editor ID="edtComments" runat="server" Height="120px" Width="610px" AutoFocus="true"
                        NoScript="true" Content="Hi,<p>Please find blah blah blah.</p><p></p><p>Thanks and Regards</p><p></p><p> My Team</p>" />
       

Monday, 19 March 2012

Response.End();

Alternate for Respose.End()

HttpContext.Current.ApplicationInstance.CompleteRequest();