Friday, May 27, 2011

How Select a perticular list item of a dropdownList

if (drpEMailListName.Items.FindByValue(Convert.ToString(dsData.Tables[0].Rows[0]["EmailListID"])) != null)
                    { drpEMailListName.Items.FindByValue(Convert.ToString(dsData.Tables[0].Rows[0]["EmailListID"])).Selected = true; }

Thursday, May 26, 2011

Check drop down list is that value is present or not in list in c#

if (ddlUserType.Items.FindByValue("someValue") != null)   
{    
ddlUserType.SelectedValue = "someValue";     
}  

Saturday, May 21, 2011

How User control can call with out Register in ASPX page

if you add or call user control in web configuration

<configuration>
<system.web>
<pages><control>
<add src="../App_Controls/Admin.ascx" tagname="Header" tagprefix="Osnadmin">
<add src="../App_Controls/AdminLogin.ascx" tagname="LoginHeader" tagprefix="Osnadmin">
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.UI" tagprefix="asp">
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.UI.WebControls" tagprefix="asp">


</add></add></add></add></control>
</pages>
</system.web>
</configuration></div>














How to set an icon in a web site

 <head id="Head1" runat="server">
    <title>NeedNexus</title>
    <link href="../CSS/ie8-and-up.css" rel="stylesheet" type="text/css" media="all" />
    <link href="../CSS/style.css" rel="Stylesheet" type="text/css" media="all" />
    <link href="../CSS/main.css" rel="Stylesheet" type="text/css" media="all" />
    <link type="text/css" href="../CSS/jquery.mcdropdown.css" rel="stylesheet" media="all" />
    <link href="../fav_icon_1.png" rel="shortcut icon" />
    <link href="../neednexus_icon.ico" rel="shortcut icon" />

</head>

../ - means the main folder
Before you follow this just remove "!" from all tag
If this code help you please visit again . thank you for visit.

SQL Optimization

  SQL Optimization  1. Add where on your query  2. If you remove some data after the data return then remove the remove condition in the sel...