I'm trying to create my first web form app using c# -
i'm trying create first web form app , trying use checkbox giving me issues. want submit button deduct database , ive done checkbox
     private void bindgrid()      {           try          {              sqlconnection con = new sqlconnection("data source=w-it004\\mssqlserver2012;initial catalog=mydatabase;user id=sa;password=qwerty;pooling=false");              con.open();              sqlcommand cmd = new sqlcommand("select [title], [duration], [oldborrowprice] ,[damage price] movie", con);              sqldataadapter da = new sqldataadapter(cmd);              datatable dt = new datatable();               da.fill(dt);               gridview1.datasource = dt;              gridview1.databind();               con.close();              da.dispose();          }          catch (exception ex )          {               string exx = ex.message;          }      }     protected void borrowbutton_click(object sender, eventargs e)     {      } 
here have datatable dt=new datatable();
try use
dataset ds=new dataset(); da.fill(ds); gridview1.datasource=ds; gridview1.databind(); i hope work
Comments
Post a Comment