Want to build the ChatGPT based Apps? Start here
Become a member
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
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
Vasanth Jack
1.9k
289
30.4k
How to change the Button color which in the nested Gridview
Jan 17 2017 5:38 AM
I have a button which is inside the datalist,te datalist which is inside the Gridview.
I want to change the button color which is inside the datalist
protected void rptrbus_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string id = rptrbus.DataKeys[e.Row.RowIndex].Value.ToString();
// Session["id"] = id.ToString();
DataList dlseat = e.Row.FindControl("dlSeat") as DataList;
string strConnString = ConfigurationManager.ConnectionStrings["str"].ConnectionString;
using (SqlConnection con = new SqlConnection(strConnString))
{
SqlCommand cmd = new SqlCommand("sp_Trial1", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.CommandType = System.Data.CommandType.StoredProcedure;
// string id = HttpContext.Current.Session["id"].ToString();
cmd.Parameters.AddWithValue("@id", id);
DataTable dt = new DataTable();
da.Fill(dt);
dlseat.DataSource = dt;
dlseat.DataBind();
}
}
Reply
Answers (
1
)
files move from one location to another location
Temp data loss after returning JSON type