You are currently browsing the tag archive for the ‘Asp_net’ tag.

http://msmvps.com/blogs/simpleman/archive/2005/07/18/57948.aspx
<form id="Form1" method="post" runat="server">

< FONT>   <asp:DropDownList id="DropDownList1" runat="server">
       <asp:ListItem Value="-1">--> Choose  <--<!--asp:ListItem>
       <asp:ListItem Value="1">Lebanon<!--asp:ListItem>
       <asp:ListItem Value="2">Kuwait<!--asp:ListItem>
   </<!--asp:DropDownList>
   <asp:RequiredFieldValidator id="RequiredFieldValidator1" 
       runat="server" ErrorMessage="You must select a valid option"
       ControlToValidate="DropDownList1" InitialValue="-1" 
       Display="Dynamic" />
<!--<P>
    <asp:Button id="Button1" runat="server" Text="Post Back" />
<<!--<!--P>
<!--<form>

http://www.dotnetspider.com/resources/23154-Adding-Javascript-Alert-for-Delete-button.aspx

Event of GridView

OnRowDataBound=”GridView1_RowDataBound”

Code behind:

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        //add  javascript alert for delete link button
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            LinkButton l = (LinkButton)e.Row.FindControl(“lbtnDeleteGrid”);
            l.Attributes.Add(“onclick”, “return confirm(‘Ban có muốn xóa ngày này không ?’)”);
        }

    }

grid.row[0].cells[0].text = Server.HTMLEncode(“<b>hlml encode :D </b>”);

http://www.codeproject.com/KB/session/Reconnect.aspx

<%@ OutputCache Location=”None” VaryByParam=”None” %>
<html>
</html>

http://www.codeproject.com/KB/session/Reconnect.aspx

html control:
input type=’text’ name=’text1′

code in .cs file :
if (Request.Form["text1"] is object)
item.Text = Request.Form["text1"].ToString();

In *.aspx insert control :
asp:Literal ID=”literal1″ runat=”server”

In *.aspx.cs insert code html wanted:
literal1.text = “hello“;

and more than ….

private void SortEntities(List _entities)
{
_entities.Sort(delegate(salary_processEntity x, salary_processEntity y)
{
return new employeesDAO().SelectOne(x.employee_code).employee_name.CompareTo(new employeesDAO().SelectOne(y.employee_code).employee_name);
});
}

Archives

Blog Stats

  • 18,100 hits
Follow

Get every new post delivered to your Inbox.