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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ankit NandekarPosted Apr 19, 2011, 4:04 AM
SELECT LEFT([Article],200)
FROM ArticleTable
here LEFT function retrieve only 200 words u can increase how many u want to display .
Suthish NairPosted Apr 20, 2011, 3:33 PM
Sam HobbsPosted Apr 19, 2011, 5:16 PM
sarbjeet singhPosted Apr 19, 2011, 2:19 AM
Ankit NandekarPosted Apr 19, 2011, 2:07 AM
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.