sir,
I used ur code while developing some of my modules and they work fantastic...now i have a prob was working on that from last week bt unable to correct it can u plz help m out??
I have a textbox under that i have taken a checkbox that is giving input in form of 1 or 0
and under that i have taken a gridview in which my column name is ID,name and Ismain with a radiobutton what i want is that when i select checkbox the ismain should give value 1 or 0 else when i select radiobutton Ismain should give the same value as Id....
hope to have a positive rply from ur side...
thanks in advance..
i have done this using linq..This is what i have done till nw
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
fillgrid();
}
}
protected void btnsub_Click(object sender, EventArgs e)
{
masterdataDataContext db = new masterdataDataContext();
{
string name = txtname.Text.ToString();
int IsMain = Convert.ToInt32(Chckmain.Checked);
int checkBoxVal;
if (Chckmain.Checked)
{
checkBoxVal = 1;
}
db.getdata(name, IsMain);
db.SubmitChanges();
fillgrid();
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
fillgrid();
}
public void fillgrid()
{
masterdataDataContext db = new masterdataDataContext();
var categories = db.getalldata();
GridView1.DataSource = categories.ToList();
GridView1.DataBind();
}
}