|
Post by madmaxpaki on Sept 6, 2016 23:04:51 GMT
Hallo. Thanks for the videos! i have a problem. i cant see the picture, descriptions or click on the ddlamount, in product.aspx site private void FillPage() { if (!string.IsNullOrWhiteSpace(Request.QueryString["id"])) { int id = Convert.ToInt32(Request.QueryString["id"]); ProductsModel model = new ProductsModel(); Product product = model.GetProduct(id); lblTitle.Text = product.Name; lblDescription.Text = product.Desc; lblPrice.Text = "Price per unit:<br/> $ " + product.Price; imgProduct.ImageUrl = "~/Images/Products/" + product.Image; lblItemNr.Text = product.ID.ToString(); int[] amount = Enumerable.Range(1, 20).ToArray(); ddlAmount.DataSource = amount; ddlAmount.AppendDataBoundItems = true; ddlAmount.DataBind(); } } please help me I have the same problem. Help me if u have resolved the error.
|
|
|
Post by jerry on Oct 18, 2016 22:31:55 GMT
hey! how can i make a range for size of clothes like "s" "m" "l" ?
this is for range 1-20 int[] amount = Enumerable.Range(1, 20).ToArray();
i think im need to use "string" but i dont know..
can someone get me som tip?
|
|
|
Post by jgir on Dec 3, 2016 10:46:28 GMT
Hallo. Thanks for the videos! i have a problem. i cant see the picture, descriptions or click on the ddlamount, in product.aspx site private void FillPage() { if (!string.IsNullOrWhiteSpace(Request.QueryString["id"])) { int id = Convert.ToInt32(Request.QueryString["id"]); ProductsModel model = new ProductsModel(); Product product = model.GetProduct(id); lblTitle.Text = product.Name; lblDescription.Text = product.Desc; lblPrice.Text = "Price per unit:<br/> $ " + product.Price; imgProduct.ImageUrl = "~/Images/Products/" + product.Image; lblItemNr.Text = product.ID.ToString(); int[] amount = Enumerable.Range(1, 20).ToArray(); ddlAmount.DataSource = amount; ddlAmount.AppendDataBoundItems = true; ddlAmount.DataBind(); } } please help me
|
|
|
Post by jgir on Dec 3, 2016 10:52:22 GMT
go to index.aspx.cs page and correct this line in foreach loop of FillPage Method from "imageButton.PostBackUrl = "~/Pages/Product.aspx?id" + product.id;" to "imageButton.PostBackUrl = "~/Pages/Product.aspx?id=" + product.id;" then it will work correctly...............
|
|
|
Post by joel on Feb 6, 2017 9:31:18 GMT
hey my product page dose not load the image and price so what do i do...??
|
|
|
Post by joel on Feb 6, 2017 9:56:52 GMT
this is wat it looks like
|
|
|
Post by Asif on Apr 14, 2017 19:47:15 GMT
hi,
i am also stuck here
i have a problem. i cant see the picture, descriptions or click on the ddlamount, in product.aspx site
private void FillPage() {
if (!string.IsNullOrWhiteSpace(Request.QueryString["id"])) { int id = Convert.ToInt32(Request.QueryString["id"]); ProductsModel model = new ProductsModel(); Product product = model.GetProduct(id);
lblTitle.Text = product.Name; lblDescription.Text = product.Desc; lblPrice.Text = "Price per unit:<br/> $ " + product.Price; imgProduct.ImageUrl = "~/Images/Products/" + product.Image; lblItemNr.Text = product.ID.ToString();
int[] amount = Enumerable.Range(1, 20).ToArray(); ddlAmount.DataSource = amount; ddlAmount.AppendDataBoundItems = true; ddlAmount.DataBind(); } }
|
|
|
Post by Mika on Apr 7, 2018 17:02:11 GMT
Please HELP!!!! My images are not displaying from left to right, just vertically. What am i doing wrong?
|
|
aisu
New Member
Posts: 1
|
Post by aisu on May 17, 2018 9:45:14 GMT
Hello Michiel Wouters, hello everybody! Thank you for your lessons, videos! Please help me. How to use FileUpload1 instead dropdownlist in ManageProducts? I tryed do the following:
if (!FileUpload1.HasFile) { Label1.Text = "Please Insert Image"; } else { Label1.Text = "Image Uploaded"; byte[] bytes; using (BinaryReader br = new BinaryReader(FileUpload1.PostedFile.InputStream)) { bytes = br.ReadBytes(FileUpload1.PostedFile.ContentLength); } GarageEntities db = new GarageEntities(); db.Add(new Product { Name = Path.GetFileName(FileUpload1.PostedFile.FileName), Image = bytes.ToString() }); db.SaveChanges();
|
|
|
Post by Jade on May 6, 2019 8:26:14 GMT
Hi Michiel, Thankyou for this amazing tutorial Hello everyone, I new with visual studio, anyway I'm stuck with product.aspx
int[] amount Enumerable.Range(1, 10).ToArray(); ddlAmount.DataSource = amount; ddlAmount.AppendDataBoundItems = true; ddlAmount.DataBind();
there a red line on Enumerable and below it another red line on amount. I try searching for Enumerable and stuff but still got stuck... anyway does anyone know why the red line.
|
|
|
Post by prasad on Sept 20, 2019 17:05:58 GMT
Hallo. Thanks for the videos! i have a problem. i cant see the picture, descriptions or click on the ddlamount, in product.aspx site private void FillPage() { if (!string.IsNullOrWhiteSpace(Request.QueryString["id"])) { int id = Convert.ToInt32(Request.QueryString["id"]); ProductsModel model = new ProductsModel(); Product product = model.GetProduct(id); lblTitle.Text = product.Name; lblDescription.Text = product.Desc; lblPrice.Text = "Price per unit:<br/> $ " + product.Price; imgProduct.ImageUrl = "~/Images/Products/" + product.Image; lblItemNr.Text = product.ID.ToString(); int[] amount = Enumerable.Range(1, 20).ToArray(); ddlAmount.DataSource = amount; ddlAmount.AppendDataBoundItems = true; ddlAmount.DataBind(); } } please help me pl help same problem
|
|
|
Post by Suraj Prajapati on Mar 6, 2020 0:54:42 GMT
Hii I am having an error under the pages folder in product.aspx file in the <tr> function where it's showing that to many nested loops are on n also tr function cannot be open n closed in between of the text button
|
|
|
Post by Lloydwiday on Nov 5, 2020 14:36:52 GMT
Hi, here on the forum guys advised a cool Dating site, be sure to register - you will not REGRET it <a href=https://bit.ly/384HTnk>https://bit.ly/384HTnk</a>
|
|