Click here to Skip to main content
15,898,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a static website have 15 pages.. i am not using any database in my website.

i want to search all links from the website and also redirect to that page..

how i will perform .. please give me suggestion..

thanks in advance
Posted

Hello Dude,

You can create DataTable in code behaind it self just create datatable store value in to datatable and process it

DataTable dt = new DataTable();
    dt.Columns.AddRange(new DataColumn[3] { new DataColumn("Id", typeof(int)),
                        new DataColumn("PageName", typeof(string)),
                        new DataColumn("PageUrl",typeof(string)) });
    dt.Rows.Add(1, "Page1", "Page1.aspx");
dt.Rows.Add(2, "Page2", "Page2.aspx");
dt.Rows.Add(3, "Page3", "Page3.aspx");
dt.Rows.Add(4, "Page4", "Page4.aspx");
 
Share this answer
 
v3
Comments
bindash 20-Nov-14 2:24am    
please explain.. i am new in development
try this :

C#
string filename = "Formame.aspx";
string name = Request.PhysicalApplicationPath +"Foldername\\"+ filename;
bool status = System.IO.File.Exists(name);
if(status==true)
{
//your COde
}
else 
{
//your code
}
 
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