I have the following code which generates a list of linkbuttons:
public void getSocialStories()
string user = getSelectedUser();
List<SocialStory> stories = new List<SocialStory>();
stories = functions.getSocialStories(user);
foreach (SocialStory story in stories)
LinkButton lb = new LinkButton();
lb.Text = story.Social_story_name;
ph.Controls.Add(new LiteralControl("<br />"));
And I have a empty asp panelholder:
<asp:PlaceHolder runat="server" ID="ph"></asp:PlaceHolder>
It gets filled with the linkbuttons, which are a result from a mssql database.
I want when a linkbutton is clicked to call a c# function. This function should take a parameter the social_story_id. How can I do that ?
I think one of the ways is using Ajax, but I don't know how to do it. Are there other ways and if not how to do it with ajax?