Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
how to assign string value to repeater label
Nilesh Patil
6 years ago
168
Reply
Hi,
I am try to assign string value to repeater control but it gives error Object refernce not set to an insant of object.
Below is my code
foreach (DataRow dRow in dt_OwnerFilter.Rows)
{
if (dt_OwnerFilter.Rows.Count > 0)
{
string htmlcode = "";
htmlcode = "<a class='btn btn-primary' onclick='fnShow(" + dRow["PropertyDetailsId"] + ")'> " + i + "</a>";
Label status = (Label)b.NamingContainer.FindControl("lbldata");
status.Text += htmlcode + "<br>"; //Here is error
}
i = i + 1;
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
push notification not working in TLS 1.1
How to call Javasrcipt fuction in label tag with paramaters