hi
i have a table for store information my page called (tbl_Page) with this fields :
ID - Name - Title - KeyWord - Content
now i want create a list with html (
please help me how to create it
thanks
hi
i have a table for store information my page called (tbl_Page) with this fields :
ID - Name - Title - KeyWord - Content
now i want create a list with html (
please help me how to create it
thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vahid BakhtiaryPosted May 28, 2012, 8:50 AM
i try them
iin the end link,the project don't create a new page,and create a id and pass id to default.aspx page
but i want create be aspx page in db no in root my website
please help me how to create dynamic page
Jignesh TrivediPosted May 28, 2012, 5:28 AM
Ok for same you can use ready made CMS like DNN,Orchard,Composite ect....
please refer
http://webmasterformat.com/blog/top-asp-net-cmss
From that I prefferd DNN(it a freeware).
http://www.dotnetnuke.com/
Also refer
http://www.codeproject.com/Articles/7673/Basic-Content-Management-System-with-ASP-NET-and-M
this link shows how to load dynamic control.
hope this will help you.
Vahid BakhtiaryPosted May 28, 2012, 2:02 AM
your code are right
but my means how to create dynamic page like CMS
i have a form that get information pages and store in db
for example :
ID Title MetaKeyword Content
1 Home Home
Wellcome to my Site
2 Product product
Categories
now i want create a Menu for them for example :
Home | Product
now when i click on one of them redirect to them
please help me how to creat it
thanks
Jignesh TrivediPosted May 28, 2012, 12:09 AM
For same you can use in buit control like Repeater or list view that support in built html.
Other option is create HTML String and add it as child control.
please refer
http://www.ezineasp.net/post/Create-dynamic-tables-using-HtmlControls-HtmlTable.aspx
hope this help.
Anil KumarPosted May 27, 2012, 11:10 PM
.
Create an object of your data class of tbl_Page OR execute a query and stored it in a datareader which is faster for reading jobs.
Use StringBuilder to append your list into loop. While appending items, you required to give the url of the corresponding page. So corresponding page address/url should be also stored in your tbl_Page table.
SqlCommand myCommand = new SqlCommand( "SELECT Name, PageURL FROM tbl_Page;", myConnection);
myConnection.Open();
SqlDataReader myReader = command.ExecuteReader();
if (myReader !=null && myReader.HasRows)
{
while (myReader.Read())
{
// here you append your list (
}
}
myReader.Close();
OR
You can go for static methods