hello guys ,,
i have one column in database name article ,i just want to show one line of article using datalist and i will give read more option next to that plz tell me how to do
thanx in advance
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Ankit NandekarRank #703 · 3.4K reputationPosted Apr 19, 2011, 12:04 AM EDT
SELECT LEFT([Article],200)
FROM ArticleTable
here LEFT function retrieve only 200 words u can increase how many u want to display .
Ankit NandekarRank #703 · 3.4K reputationPosted Apr 18, 2011, 10:07 PM EDT
1. Design DataList as per ur requirement.
2.on DataList ItemTemplate write like this
ArticleId must be unique.
in Code File DataList's ItemCommand event write this code
protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
{
if (e.CommandName == "Readmore")
{
Response.Redirect("ReadMore.aspx?id=" + e.CommandArgument);
}
}
3. Readmore.aspx page Load event use this query to fetch Details
"select * from Mobile_table where Product_id="+Request["id"]+""
if u r getting any problem then let me know.
sarbjeet singh69 reputationPosted Apr 18, 2011, 10:19 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Apr 19, 2011, 1:16 PM EDT
Suthish NairRank #92 · 22.8K reputationPosted Apr 20, 2011, 11:33 AM EDT