using System;
using System.Collections;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OracleClient;
using System.Data;
using System.Collections.Generic;
using System.Linq;
public partial class page_gridview : System.Web.UI.Page
{
string strcon = ConfigurationManager.ConnectionStrings["oracle"].ConnectionString;
SqlDataSource sdc = null;
string strselect = "select customer_name,product,quantity,price,date_info from db_list";
protected void page_Init(object sender, EventArgs e)
{
sdc = new SqlDataSource(strcon, strselect);
sdc.ID = "sdc";
sdc.DeleteCommand = "delete from db_list where customer_name=:p_customer_name";
sdc.DeleteParameters.Add(new Parameter("customer_name", TypeCode.String));
sdc.UpdateCommand = "update db_list set product=:p_product,quantity=:p_quantity,price=:p_price,date_info=:p_date_info where customer_name=:p_customer-name";
sdc.UpdateParameters.Add(new Parameter("customer_name", TypeCode.String));
sdc.UpdateParameters.Add(new Parameter("product", TypeCode.String));
sdc.UpdateParameters.Add(new Parameter("quantity", TypeCode.Decimal));
sdc.UpdateParameters.Add(new Parameter("price", TypeCode.Decimal));
sdc.UpdateParameters.Add(new Parameter("date_info", TypeCode.DateTime));
Form.Controls.Add(sdc);
GridView1.DataSourceID = "sdc";
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GridView1.DataBind();
}
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
DataKey key = GridView1.SelectedDataKey;
Response.Write("Selected customer name ::"+key.Value);
}
}
keyword not supported: 'unicode'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Keyword not supported: 'unicode'.
Source Error:
Line 36: if (!IsPostBack)
Line 37: {
Line 38: GridView1.DataBind();
Line 39: }
Line 40:
Source File: d:\Rahul_doc_soft\product\page\gridview.aspx.cs Line: 38
i am getting error when i put the value and press submit button then i am getting error which i mension above
plese help me
give me proper solution