I am trying to maintain this site unfortunately I have very basic asp.net experience. I have a simple question for most of you.
The following code on the course.aspx.cs code behind page. The way this code designed is there is a button (btnAddToQueue.Text)
on the pop-up modal message type when that button is clicked it's fired up the (btnAddToQueue_OnClick) event below. However, it doesnot seem to be doing that. I am not sure if it is being called correctly. if not, how do I make it to fire up the (btnAddToQueue_OnClick) event when clicked on the (Add To Queue) button? Thanks
public void gvCourses_OnRowCommand(object sender, GridViewCommandEventArgs e)
{
switch (commandName.ToLower())
{
case "alternate":
break;
case "queue":
btnAddToQueue.Text = "Add To Queue"; <--click on this button
lbtnQueueClose.Text = "Exit";
modalQueue.Show();
case "download":
break;
}
}
catch(Exception ex)
{
err = "Message: gvCourses_onRowCommand: " + ex.Message + "InnerException:" + ex.InnerException;
}
}
}
protected void btnAddToQueue_OnClick(object sender, EventArgs e) <---fire this event
{
try
{
qCourseId = (string)Session["courseId"];
qCourseTitle = (string)Session["courseTitle"];
studentAccessContent.addCourseToQueue(studentId, qCourseId, qCourseTitle, DateTime.Today.AddDays(90), 0);
lbMessage.Text = qCourseTitle + " course has been added to your Queue";
modalMessage.Show();
}
catch (Exception ex)
{
err = "Message: btnAddToQueue_OnClick: " + ex.Message + "InnerException:" + ex.InnerException;
}
}
The following code on the course.aspx.cs code behind page. The way this code designed is there is a button (btnAddToQueue.Text)
on the pop-up modal message type when that button is clicked it's fired up the (btnAddToQueue_OnClick) event below. However, it doesnot seem to be doing that. I am not sure if it is being called correctly. if not, how do I make it to fire up the (btnAddToQueue_OnClick) event when clicked on the (Add To Queue) button? Thanks
public void gvCourses_OnRowCommand(object sender, GridViewCommandEventArgs e)
{
switch (commandName.ToLower())
{
case "alternate":
break;
case "queue":
btnAddToQueue.Text = "Add To Queue"; <--click on this button
lbtnQueueClose.Text = "Exit";
modalQueue.Show();
case "download":
break;
}
}
catch(Exception ex)
{
err = "Message: gvCourses_onRowCommand: " + ex.Message + "InnerException:" + ex.InnerException;
}
}
}
protected void btnAddToQueue_OnClick(object sender, EventArgs e) <---fire this event
{
try
{
qCourseId = (string)Session["courseId"];
qCourseTitle = (string)Session["courseTitle"];
studentAccessContent.addCourseToQueue(studentId, qCourseId, qCourseTitle, DateTime.Today.AddDays(90), 0);
lbMessage.Text = qCourseTitle + " course has been added to your Queue";
modalMessage.Show();
}
catch (Exception ex)
{
err = "Message: btnAddToQueue_OnClick: " + ex.Message + "InnerException:" + ex.InnerException;
}
}