My webform consists textbox,checkbox,radiobutton,on submit the data to bind to grindview and display.
here my aspx code is:
| name: | |
| mobile number: | |
| Email: | |
state: | |
| select course: | html(300 rs) |
| javascript-css(1000 rs) | |
| c(500 rs) | |
| .net(2500 rs) | |
| java(3000 rs) | |
| Applictiona fee: | (* application fee (50 rs/-) |
| Total amount: | (include application fee.) |
| Timmings: | 7:00-9:00am(fasttrack) |
11:00-12:00pm(normaltrack) | |
5:00-7:00pm | |
public partial class jsv : System.Web.UI.Page
{
DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.Add(new DataColumn("name"));
dt.Columns.Add(new DataColumn("email"));
dt.Columns.Add(new DataColumn("selectcourse"));
dt.Columns.Add(new DataColumn("totalamount"));
DataRow dr = dt.NewRow();
gvbind.DataSource = dt;
gvbind.DataBind();
}
}
protected void sub_Click(object sender, EventArgs e)
{
DataRow dr = dt.NewRow();
dr[1] = txt1.Text;----------------imgetting error here
dr[2] = txt2.Text;
gvbind.DataSource = dt;
gvbind.DataBind();
}
And i need how to bind multiple checked value and radio button value in gridview
Francis SusaimichaelPosted Jul 8, 2016, 11:48 AM
Raja TPosted Jul 8, 2016, 10:22 AM