This is a migrated thread and some comments may be shown as answers.

Imageurl changed after postback

1 Answer 19 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
mohmedsadiq modan
Top achievements
Rank 1
mohmedsadiq modan asked on 24 Jun 2010, 10:16 AM
HI,

In treeview bind only root nodes with ServerSideCallBack when i click on plus image  its child node is loaded without post back
in this process i assign  imageurl property 
Node.ImageUrl = Row("ImageUrl").ToString()

Row("ImageUrl") contain value "Q1".

when I postback page and then get imageurl property, i get website URL with "Q1" like
"http://mysite/View/Q1"

i need only "Q1"

how can i get this value.

Thanks in advance

regards,
sadiq modan

1 Answer, 1 is accepted

Sort by
0
Nikolay Tsenkov
Telerik team
answered on 30 Jun 2010, 11:05 AM
Hi mohmedsadiq modan,

This doesn't reproduce.

Even if it did, though, you can easily get the last token (using '/' for delimiter) of the string of ImageUrl:
int indexLastSlash = node.ImageUrl.LastIndexOf('/');
// lastToken is the string you need
string lastToken = node.ImageUrl.Substring(indexLastSlash + 1);

Hope this is helpful for you!


Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
mohmedsadiq modan
Top achievements
Rank 1
Answers by
Nikolay Tsenkov
Telerik team
Share this question
or