Thursday, 27 September 2012

Make ReadOnly='True' in ASP.NET and value should be acceseble.


Some times we have seen that when we make the text box as read only the changed value of those text box is not accesseble but its visible.

so in that case we make the Fuction like below:

 void ReadOnlyTextBoxes()
    {
        txtFDate.Attributes.Add("readonly", "readonly");

    }

and call thsi fuction in

  protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {


    ReadOnlyTextBoxes();

}
    }

Wednesday, 19 September 2012

Not getting the Checkbox check value in gridviewbind using the gridview.


when ever you use gridviewbind the check value of check box is not coming in the page.

in that case we use the



 protected void Page_Load(object sender, EventArgs e)
    {
      if (!Page.IsPostBack)
       {
         gridviewbind();
       }
    }


The if (!Page.IsPostBack) use to remove this kind of issues

How to Create rar or zip file from Command Prompt

Go To Command prompt

change the full path of where rar is installed

Like CD C:\Program Files\WinRAR

then type

WinRAR> rar a <Name of the rar file.rar> <file to make rar>

Like  rar a C:\filename.rar  C:\filename.doc

then press Enter.