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
Sam123
NA
45
2.3k
c# developement
Apr 2 2020 10:15 PM
Question - I got an error while debugging the program DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'SupportRepresentative'. Just check the database field also ID and Represenativename columns are present. Please anyone help me for this.
public
void
BindSupportActivity_Representativename()
{
try
{
using
(SqlConnection sqlCon =
new
SqlConnection(@
"Data Source=IN5CG9261RDP;Initial Catalog=TASKDETAILS;Trusted_Connection=True"
))
{
{
sqlCon.Open();
string
query =
"select * from mRepresentative"
;
SqlDataAdapter sqladpt =
new
SqlDataAdapter(query, sqlCon);
DataTable dt =
new
DataTable();
sqladpt.Fill(dt);
SupportRepresentative.DataSource = dt;
SupportRepresentative.DataBind();
SupportRepresentative.DataTextField =
"RepresentativeName"
;
SupportRepresentative.DataValueField =
"ID"
;
SupportRepresentative.DataBind();
}
}
}
catch
(Exception ex)
{
throw
;
}
Reply
Answers (
3
)
create Properties.Setting at runtime
Get Multiple location in c#.