Last post Mar 26, 2008 03:04 AM by Abitha
Mar 22, 2008 09:02 AM|Abitha|LINK
i am using datalist to display long story which is from memo data type of MDB file.
i am using this function to display
Public Function getpage(ByVal fullstory
ByVal id As
nxt = nxt + 1
i used this code in datalist.
now my problem is, i want to count lines/linebreaks in this story....can pls anyone solve this issue.
thanks in advance. bye.
Mar 22, 2008 10:00 AM|Mikesdotnetting|LINK
Take the full story and use string.Split() on the line-break character (Environment.NewLine) to produce a zero-indexed one-dimensional array of elements containing each line. Array.Length will tell you how many elements there are in the array.
Mar 23, 2008 01:20 AM|Abitha|LINK
If u dont mind, can u pls tell me the code how to implement.i am struggling with this prob for a long time.
plsssssssssss. thanks in advance ........
Mar 23, 2008 04:53 AM|Mikesdotnetting|LINK
Dim parts() As String = fullstory.Split(Environment.NewLine)
Dim NumberOfLines As Integer = parts.Length
It really is as simple as I described.
By the way, here's how I do paging for long articles:
http://www.mikesdotnetting.com/Article.aspx?ArticleID=25. It's in C#, but you can go to
www.codechanger.com to convert it to VB.
Mar 24, 2008 01:27 AM|Abitha|LINK
Thank u v much for your help. but i am sorry to say that this is not working. same code i applied in my code file. In first page its displaying upto certain limit.but when i click hyperlink
Next it displays full story without any line breaks. just continuously displaying full story.
The code is
PageNumber = System.Convert.ToInt32(PageNo)
Output = Pages(PageNumber - 1)
Output += Counter.ToString() +
System.Math.Max(System.Threading.Interlocked.Increment(Counter), Counter - 1)
Output = Article
but not working. can u pls give me any idea.
the code changer site is v useful site.thanks again. pls give me any idea.
Mar 26, 2008 03:04 AM|Abitha|LINK
i am still awaiting for your reply. as its urgent pls give me any idea soon.
other than mike also anybody pls help in this regard.