Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have one d folder in that folder file as follows
RM.html


I have one dropdownlist (RM) When i select the RM from the dropdownlist i want to display RM.html file from the folder d.


For that how can i do in asp.net using c# to display html using c#.
Posted
Comments
Thanks7872 11-Dec-14 4:44am    
We are not getting paid to work for you. Post such requirements at freelancer sites.

1 solution

create a dropdownlist and add items to the list and set the value to each item to the url of the page you want to fetch

XML
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
    <asp:ListItem Value="http://www.something.com/page1.htm">Item1</asp:ListItem>
    <asp:ListItem Value="http://www.something.com/page2.htm">Item2</asp:ListItem>
</asp:DropDownList>


then when the dropdownlist changes item it redirects to the desired url

C#
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
    Response.Redirect(DropDownList1.SelectedValue);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900