ASP .Net Question. Where to set breakpoint

Archived from the original Sajha.com — preserved as posted, replies can no longer be added here.
Start a New Discussion
Archived Post

Assignment says to set break point, but I am not sure if I'm setting it up in the correct procedure, need help. Display the code for the Order page, and set a breakpoint on the statement in the Load event handler that calls the GetSelectedProduct procedure using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Data; public partial class Order : System.Web.UI.Page { private Product selectedProduct; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) ddlProducts.DataBind(); selectedProduct = this.GetSelectedProduct(); lblName.Text = selectedProduct.Name; lblShortDeskription.Text = selectedProduct.ShortDeskription; lblLongDeskription.Text = selectedProduct.LongDeskription; lblUnitPrice.Text = selectedProduct.UnitPrice.t0script("c"); imgProduct.ImageUrl = "Images/Products/" + selectedProduct.ImageFile; } private Product GetSelectedProduct() { DataView productsTable = (DataView) SqlDataSource1.Select(DataSourceSelectArguments.Empty); productsTable.RowFilter = "ProductID = '" + ddlProducts.SelectedValue + "'"; DataRowView row = (DataRowView)productsTable[0];

newbie69 · Oct 16, 2016 10:06 AM · 2,901 views

1 Reply

Here selectedProduct = this.GetSelectedProduct()

guitarcenter · Oct 16, 2016 10:18 AM

This conversation is preserved exactly as it was on the original Sajha.com and can't accept new replies.

Start a New Discussion

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all