TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
deva asir
NA
171
567
i have select for gridview data showing textbox.
Jun 23 2017 1:55 AM
protected void Button5_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection();
int cmy_id = 0;
cmy_id = Convert.ToInt32(Request.QueryString["@cmy_id"].ToString());//Object reference not set to an instance of an object. error are display
if (!IsPostBack)
{
sel();
}
}
void sel()
{
string select = "select * from companydetail";
SqlCommand cmd = new SqlCommand(select, con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
con.Close();
DataSet ds = new DataSet();
da.Fill(ds);
foreach (GridViewRow gvrow in GridView1.Rows)
{
CheckBox chck = gvrow.FindControl("CheckBox1") as CheckBox;
if (chck.Checked)
{
TextBox6.Text = ds.Tables[0].Rows[0][1].ToString();
}
}
Attachment:
new_project.zip
Reply
Answers (
3
)
System.Data.SqlClient.SqlException: Incorrect syntax near ',
pressing the enter to add row of table in jquary.