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
Akshay
NA
82
46.9k
on click HtmlImage i want to open new url & display item
Nov 6 2014 2:47 AM
i have code link this
HtmlAnchor
imganchor
= new HtmlAnchor();
imganchor.Attributes.Add("href", "http://www.google.com");
HtmlImage image = new HtmlImage("div");
image.InnerHtml = item["QuickLinkIcon"] != null && item["QuickLinkIcon"].ToString() != string.Empty ? item["QuickLinkIcon"].ToString() : "";
imganchor.Controls.Add(image);
captionDiv.Controls.Add(imganchor);
above where i mark link with color ,on that line i want to bind custom url that all ready present in list
so i write code for that like
HtmlAnchor link = new HtmlAnchor();
string url = item["URL"] != null && item["URL"].ToString() != string.Empty ? item["URL"].ToString() : "#";
string[] urls= url.Split(',');
link.HRef=urls[0].Trim(' ');
link.Attributes.Add("class","link");
captionDiv.Controls.Add(link);
now i want to bind this custom link to
imganchor
Reply
Answers (
0
)
remove the html tags for text in CAML
error:Object reference not set to an instance of an object.