Link to home
Start Free TrialLog in
Avatar of DMcGown
DMcGown

asked on

.NET C# - CS page

I have a Web site that has this code of the CS page

 {
                string title = user.getResourceTitle(file.Substring(file.LastIndexOf("\\") + 1));
                plcLinks.Controls.Add(new LiteralControl("<h2>" + title + "</h2>"));
                i++;
                HyperLink lnk = new HyperLink();
                lnk.Text = file.Substring(file.LastIndexOf("\\") + 1);
                lnk.NavigateUrl = "../secure/Uploads/" + file.Substring(file.LastIndexOf("\\")+1);
                lnk.Visible = true;
                lnk.ID = "lnk" + i.ToString();
                plcLinks.Controls.Add(lnk);
                plcLinks.Controls.Add(new LiteralControl("<br />"));
            }

I have the <h2> tag going to my title... I want the <p> tag to go to my links... I can't figure out how to incorporate the <p> tag to my links... I did not write this code... I am a dummy beginner.

Thank you...
ASKER CERTIFIED SOLUTION
Avatar of NIMTUG_Simon
NIMTUG_Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DMcGown
DMcGown

ASKER

Perfect... That did the trick! - Thank you!