TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
padmapriya patruni
NA
74
117.9k
split code of 1,5,6 and 5,1-5.
Apr 10 2014 7:48 AM
my problem is whenever user clicks the 1,5,6 link button it should be split and user clicks 5,1-5 button this is should be split please find the attachment. i wrote the code for 5,1-5.it is working but whenever user clicks the5,1-5. linkbutton it is showing error please help me.i bind the details into the pagesid.
public ActionResult GetPages(string PagesId)
{
if (!String.IsNullOrEmpty(PagesId))
{
string[] split = PagesId.Split(',');
string[] split2 = split[1].Split('-');
var sb = new System.Text.StringBuilder();
for (int i = int.Parse(split2[0]); i <= int.Parse(split2[1]); i++)
{
sb.Append(i.ToString());
sb.Append(",");
}
string output = split[0] + "," + sb.ToString().TrimEnd(',');
Reply
Answers (
5
)
how to get the images from local folder in c#.net
How to translate English letters/words to Bengali using c#?