which control use for long text in asp.net?
hello..
i am making website on "online electronics products" in asp.net
in the product table i have
product id
product name
product price
product image
bt problem is how to give features for each product??
what are the options for that??
i mean should i add new field for that? or i have to make a seperate page for each product?
i am confused abt it.. features are of 8-10 line..
so any one know abt this plz reply..
thanx!!

Kirtan PatelPosted Oct 14, 2009, 2:16 PM
Here I have included Complete Coded Example for you download it and take a look :)
Here is Download Link Download Project Files
dont forget to mark "Do you like this answer" please it will give me some credits :)
Here is Some Description about Code I have coded
I have Taken a GridView in Products.aspx and Added one Template Column With Hyperlink
and Set Hyperlink of That Column to
NavigateUrl='<%# Eval("ProductId","~/Display.aspx?pid={0}") %>' so When user Click the "ReadMore" in
GridView it Constructs Query String and Redirectuser to Display page
Now Display Page hase pre Designed Interface with Labels ..
Display.aspx Takes the Product ID From Query String and Display Information about that Prodicy ID in Detail
---------------------Screen Shots-------------------------
Products.aspx
Display.aspx
-----------------------------------------------------------
Product List Page Code (Products.aspx)
------------------------------
//Coding for Diplaying Products List in GridView
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True");
con.Open();
SqlCommand comm = new SqlCommand("select ProductID,ProductName,ProductPrice from Products", con);
SqlDataAdapter da = new SqlDataAdapter(comm);
DataTable dt = new DataTable();
da.Fill(dt);
con.Close();
GridView1.DataSource = dt;
DataBind();
}
Display Page Code (Display.aspx) Showing Product In More Detail
-------------------------------
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString[0] != null)
{
//Get The ProductID From Query String
int ProductId = Convert.ToInt32(Request.QueryString[0]);
string ProductName = "";
string ProductDescription = "";
string ProductPrice = "";
//Code For Displaying Product Info
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True");
con.Open();
SqlCommand comm = new SqlCommand("select * from Products where productID=" + ProductId, con);
SqlDataReader reader = comm.ExecuteReader();
while (reader.Read())
{
ProductName = reader["ProductName"].ToString();
ProductDescription = reader["ProductDetail"].ToString();
ProductPrice = reader["ProductPrice"].ToString();
}
//Show the Detailes in The Page
lblProductName.Text = ProductName;
lblProductDetail.Text = ProductDescription;
lblProductPrice.Text = ProductPrice;
}
else
{
Response.Redirect("~/Products.aspx");
}
}
Dipa AhujaPosted Oct 15, 2009, 1:08 PM
Kirtan PatelPosted Oct 14, 2009, 1:38 PM
wait for some time will Post soon :)
Dipa AhujaPosted Oct 14, 2009, 12:59 PM
http://www.homeshop18.com/shop/u/y/p-Electronics-S-Home-Q-Audio/Video-S-Leonard-Q-USB-DVD-Q-Player-Q-with-Q-Cordless-Q-Headphone-Q-and-Q-10-Q-Movie-Q-Combo/Home_Online-pI_36757-clI_2-cI_949-pCI_913-
Dipa AhujaPosted Oct 14, 2009, 12:55 PM
ipods.aspx's one of the field which will shows the item
asp:ImageButton ID="ImageButton1" runat="server" PostBackUrl='<%# Eval("purl","display.aspx?purl=items/{0}") %>' ImageUrl='%# Eval("purl","items/{0}") %' Height="100" Width="100" BorderWidth="2px"
this will open display.aspx to display that item in large view this is code in page_load of display.aspx
string s1= Request.QueryString["purl"].ToString(); Image1.ImageUrl = s1;
bt the problem is i want to show this kindof details : ................................................................................................
Features:
The SAMSUNG LCD TV SERIES 4 is the ultimate HDTV: With its elegantly refined design and superior HD picture quality it enables you to create a comfortable, connected entertainment environment that uplifts your spirit and allows your imagination to soarWide Colour Enhancer
2: More natural & deeper colour with SAMSUNG's Wide Colour Enhancer extended to display the natural green and blue. Additionally, Wide Colour Enhancer 2 technology is upgraded to reproduce the red area alsoHigh Contrast Ratio:
Enjoy a crisper image
Video:
Size: 26 inch (66inch)Resolution:
1366 x 768Dynamic Contrast
Ratio: High (50,000:1)
Viewing angle: 170°/170°
Backlight: CCFL
Audio:
Sound Output (RMS): 5 watts x 2Sound Effect
System: SRS TruSurround
HD
and also tell me how to write codes in post coz when i try to write any tag they are not displayed
Amit ChoudharyPosted Oct 14, 2009, 6:57 AM
......................Don't forget to mark it as answers if it helps you...cause that will help me to get some points..............
1. Create you product display format by using images,labels, textboxes what ever you want to display the data.
2. Bind their data to database using <%#Eval("ColumnName")%>
3. or you can use code behind variable using <%= ProductName%> tag type.
When user click on the Link of product from the data list you have to bind that link button or button or image button what ever you have used to navigate to another page just give a value to "CommandAgument='<%#Eval("ProductID")%>' of that button.
now use following code to retrieve the value of command argument when user click on that button...
now you can use parameter of url to retreive the clicked product id .... query to the databse using the product id
Get information to you local variables and assign the values using <%= ProductName%> where ProductName is code behind variable..
Dipa AhujaPosted Oct 9, 2009, 2:32 PM
Amit ChoudharyPosted Oct 9, 2009, 3:14 AM
also you can use simple label to show the text of two, three lines......
all the best
Roei BarPosted Oct 8, 2009, 4:04 PM