How to get and set a Hyperlink in a class

hignattarge

New Member
I am getting an XML list of concerts from Jambase API, I also have a class called event.cs . I run a loop putting the data from XML into Event objects. I then bind a gridview to an ArrayList of Event objects. There is a string for "band", "venue", "date" ect.The problem is I want one column to be HyperLink's that all say "info" and when you click it , it is the url for that specific event. I don't want to display the actual URL. I tried this, but no luck.\[code\] // this is from Event.cs public string Venue { get { return venue; } set { venue = value; } } public HyperLink Info { get { return info; } set { info = value; } }\[/code\]//this is where I load the XML into ArrayList\[code\] XmlDocument xmlEvent = new XmlDocument(); xmlEvent.Load(string.Format("http://api.jambase.com/search?band= {0}&apikey={1}&n=30", BandName, key)); ArrayList al = new ArrayList(); foreach (XmlNode node in xmlEvent.SelectNodes("JamBase_Data/event")) { Event event1 = new Event(); event1.Date = node.SelectSingleNode("event_date").InnerText; event1.Location = node.SelectSingleNode("venue/venue_city").InnerText + ", " + node.SelectSingleNode("venue/venue_state").InnerText; event1.Venue = node.SelectSingleNode("venue/venue_name").InnerText; event1.Info.Text = "more info"; event1.Info.NavigateUrl = node.SelectSingleNode("event_url").InnerText; al.Add(event1); } return al;\[/code\]
 
Back
Top