sadegh.te
پنج شنبه 27 شهریور 1393, 17:06 عصر
سلام خدمت اساتید محترم مشکل اینه که این صفحه که عکسشو پایین میبیند مثلا محصولات ویژه فروشگاه رو تو صفحه اصلی نمایش بده من وقتی که میخوام اطلاعات رو از دیتابیس تو این قسمت
نمایش بدم یه مشکلی پیش میاد که کل اطلاعاتو ستونی میکنه عکشو با کدایی که براش نوشتم پایین میزارم اگه میشه راهنمایی کنید که اطلاعات افقی نمایش داده بشه البته با
HTMLGenericControl از دیتابیس میخونمش کداشم پایین گذاشتم.
123633
اینم عکس مشکل وقتی که از دیتابیس میخونمش
123634
اینم کداش
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
HtmlGenericControl DIVowlcarousel = new HtmlGenericControl("DIV");
DIVowlcarousel.Attributes.Add("class", "owl-carousel");
DIVowlcarousel.Attributes.Add("data-max-items", "3");
HtmlGenericControl DIVproduct = new HtmlGenericControl("DIV");
DIVproduct.Attributes.Add("class", "product");
HtmlGenericControl DIVproductimage = new HtmlGenericControl("DIV");
DIVproductimage.Attributes.Add("class", "product-image");
DIVproductimage.Attributes.Add("alt", "Product1");
HtmlGenericControl image = new HtmlGenericControl("image");
string im;
im = ds.Tables[0].Rows[i][3].ToString();
image.InnerHtml = "<img src=\"/uploads/kala/" + im.ToString() + ".jpg\" />";
HtmlGenericControl DIVproductinfo = new HtmlGenericControl("DIV");
DIVproductinfo.Attributes.Add("class", "product-info");
HtmlGenericControl h5 = new HtmlGenericControl("h5");
h5.InnerHtml = "<h5>" + ds.Tables[0].Rows[i][1].ToString() + "</h5>";
HtmlGenericControl price = new HtmlGenericControl("price");
price.InnerText = ds.Tables[0].Rows[i][2].ToString();
HtmlGenericControl DIV = new HtmlGenericControl("DIV");
HtmlGenericControl DIVproductactions = new HtmlGenericControl("DIV");
DIVproductactions.Attributes.Add("class", "product-actions");
HtmlGenericControl span1 = new HtmlGenericControl("span");
span1.Attributes.Add("class", "add-to-cart");
HtmlGenericControl span2 = new HtmlGenericControl("span");
span2.Attributes.Add("class", "action-wrapper");
HtmlGenericControl ih = new HtmlGenericControl("ih");
ih.Attributes.Add("class", "icons icon-basket-2");
HtmlGenericControl span3 = new HtmlGenericControl("span");
span3.Attributes.Add("class", "action-name");
span3.InnerText = "افزودن به سبد خرید";
span2.Controls.Add(ih);
span2.Controls.Add(span3);
span1.Controls.Add(span2);
DIVproductactions.Controls.Add(span1);
HtmlGenericControl span4 = new HtmlGenericControl("span");
span4.Attributes.Add("class", "add-to-favorites");
HtmlGenericControl span5 = new HtmlGenericControl("span");
span5.Attributes.Add("class", "action-wrapper");
HtmlGenericControl ig = new HtmlGenericControl("i");
ig.Attributes.Add("class", "icons icon-heart-empty");
HtmlGenericControl span6 = new HtmlGenericControl("span");
span6.Attributes.Add("class", "action-name");
span6.InnerText = "افزودن به لیست مورد علاقه";
span5.Controls.Add(ig);
span5.Controls.Add(span6);
span4.Controls.Add(span5);
DIVproductactions.Controls.Add(span4);
HtmlGenericControl span7 = new HtmlGenericControl("span");
span7.Attributes.Add("class", "add-to-compare");
HtmlGenericControl span8 = new HtmlGenericControl("span");
span8.Attributes.Add("class", "action-wrapper");
HtmlGenericControl ik = new HtmlGenericControl("i");
ik.Attributes.Add("class", "icons icon-docs");
HtmlGenericControl span9 = new HtmlGenericControl("span");
span9.Attributes.Add("class", "action-name");
span9.InnerText = "مقایسه";
span8.Controls.Add(ik);
span8.Controls.Add(span9);
span7.Controls.Add(span8);
DIVproductactions.Controls.Add(span7);
DIVproductimage.Controls.Add(image);
DIVproductinfo.Controls.Add(h5);
DIVproductinfo.Controls.Add(price);
DIVproduct.Controls.Add(DIVproductimage);
DIVproduct.Controls.Add(DIVproductinfo);
DIVproduct.Controls.Add(DIVproductactions);
DIV.Controls.Add(DIVproduct);
DIVowlcarousel.Controls.Add(DIV);
box.Controls.Add(DIVowlcarousel);
}
نمایش بدم یه مشکلی پیش میاد که کل اطلاعاتو ستونی میکنه عکشو با کدایی که براش نوشتم پایین میزارم اگه میشه راهنمایی کنید که اطلاعات افقی نمایش داده بشه البته با
HTMLGenericControl از دیتابیس میخونمش کداشم پایین گذاشتم.
123633
اینم عکس مشکل وقتی که از دیتابیس میخونمش
123634
اینم کداش
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
HtmlGenericControl DIVowlcarousel = new HtmlGenericControl("DIV");
DIVowlcarousel.Attributes.Add("class", "owl-carousel");
DIVowlcarousel.Attributes.Add("data-max-items", "3");
HtmlGenericControl DIVproduct = new HtmlGenericControl("DIV");
DIVproduct.Attributes.Add("class", "product");
HtmlGenericControl DIVproductimage = new HtmlGenericControl("DIV");
DIVproductimage.Attributes.Add("class", "product-image");
DIVproductimage.Attributes.Add("alt", "Product1");
HtmlGenericControl image = new HtmlGenericControl("image");
string im;
im = ds.Tables[0].Rows[i][3].ToString();
image.InnerHtml = "<img src=\"/uploads/kala/" + im.ToString() + ".jpg\" />";
HtmlGenericControl DIVproductinfo = new HtmlGenericControl("DIV");
DIVproductinfo.Attributes.Add("class", "product-info");
HtmlGenericControl h5 = new HtmlGenericControl("h5");
h5.InnerHtml = "<h5>" + ds.Tables[0].Rows[i][1].ToString() + "</h5>";
HtmlGenericControl price = new HtmlGenericControl("price");
price.InnerText = ds.Tables[0].Rows[i][2].ToString();
HtmlGenericControl DIV = new HtmlGenericControl("DIV");
HtmlGenericControl DIVproductactions = new HtmlGenericControl("DIV");
DIVproductactions.Attributes.Add("class", "product-actions");
HtmlGenericControl span1 = new HtmlGenericControl("span");
span1.Attributes.Add("class", "add-to-cart");
HtmlGenericControl span2 = new HtmlGenericControl("span");
span2.Attributes.Add("class", "action-wrapper");
HtmlGenericControl ih = new HtmlGenericControl("ih");
ih.Attributes.Add("class", "icons icon-basket-2");
HtmlGenericControl span3 = new HtmlGenericControl("span");
span3.Attributes.Add("class", "action-name");
span3.InnerText = "افزودن به سبد خرید";
span2.Controls.Add(ih);
span2.Controls.Add(span3);
span1.Controls.Add(span2);
DIVproductactions.Controls.Add(span1);
HtmlGenericControl span4 = new HtmlGenericControl("span");
span4.Attributes.Add("class", "add-to-favorites");
HtmlGenericControl span5 = new HtmlGenericControl("span");
span5.Attributes.Add("class", "action-wrapper");
HtmlGenericControl ig = new HtmlGenericControl("i");
ig.Attributes.Add("class", "icons icon-heart-empty");
HtmlGenericControl span6 = new HtmlGenericControl("span");
span6.Attributes.Add("class", "action-name");
span6.InnerText = "افزودن به لیست مورد علاقه";
span5.Controls.Add(ig);
span5.Controls.Add(span6);
span4.Controls.Add(span5);
DIVproductactions.Controls.Add(span4);
HtmlGenericControl span7 = new HtmlGenericControl("span");
span7.Attributes.Add("class", "add-to-compare");
HtmlGenericControl span8 = new HtmlGenericControl("span");
span8.Attributes.Add("class", "action-wrapper");
HtmlGenericControl ik = new HtmlGenericControl("i");
ik.Attributes.Add("class", "icons icon-docs");
HtmlGenericControl span9 = new HtmlGenericControl("span");
span9.Attributes.Add("class", "action-name");
span9.InnerText = "مقایسه";
span8.Controls.Add(ik);
span8.Controls.Add(span9);
span7.Controls.Add(span8);
DIVproductactions.Controls.Add(span7);
DIVproductimage.Controls.Add(image);
DIVproductinfo.Controls.Add(h5);
DIVproductinfo.Controls.Add(price);
DIVproduct.Controls.Add(DIVproductimage);
DIVproduct.Controls.Add(DIVproductinfo);
DIVproduct.Controls.Add(DIVproductactions);
DIV.Controls.Add(DIVproduct);
DIVowlcarousel.Controls.Add(DIV);
box.Controls.Add(DIVowlcarousel);
}