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
Yogesh Vedpathak
678
1.4k
190.1k
Search Is Not Working Getting Error ...
Apr 2 2018 6:54 AM
Error as Follows: System.Web.HttpException: A field or property with the name 'RequestID' was not found on the selected data source.
public DataSet Bind()
{
SqlConnection con = new SqlConnection(connectString);
sqlCon = new SqlConnection(connectString);
SqlCommand cmd = new SqlCommand("select * from tbl_usermaster where UserName like'" + TextBox1.Text + "%'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
DataTable dt = new DataTable();
da.Fill(ds);
if (!object.Equals(ds, null))
{
if (ds.Tables[0].Rows.Count != 0)
{
// cmd.ExecuteReader();
gv_calllist.DataSource = ds;
// gv_calllist.DataSource = ds.Tables[0];
gv_calllist.DataBind();
}
}
return ds;
}
protected void Button1_Click(object sender, EventArgs e)
{
DataSet ds = Bind();
if (!object.Equals(ds, null))
{
if (ds.Tables[0].Rows.Count > 0)
{
gv_calllist.Visible = true;
TextBox1.Text = " ";
Label2.Text = " ";
}
else
{
gv_calllist.Visible = false;
Label2.Visible = true;
Label2.Text = "not available in the record";
}
}
}
Reply
Answers (
1
)
Selection index value comboBox
Insert into with max+1 value declared