Dynamic url structure processing

I have these tables:

Section
------------------
id
title

Page
-----------------
id
title
Section_FK
ParentPage_FK

What I am doing is, visitor visiting a page e.g. about/about.aspx

@ptitle="about"
@stitle="about"

I am actually querying the db for

select page.id from page
inner join section on page.section_fk = section.id
where
page.title=@ptitle and section.title=@stitle

But now the problem is, i wanna make it dynamic, that is it supports any kind of dynamic level of page, e.g. about/about/about/about.aspx, etc.

How can I do that in stored proc? Can someone suggest an efficient and simple way?

0
wll6568
5/5/2009 1:51:51 AM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

2 Replies
677 Views

Similar Articles

[PageSpeed] 10

do you mean a page -> section -> subsection -> subsubsection -> .. so on?
what is the design of your db structure for this?
can elaborate more

0
mo
5/5/2009 2:32:26 AM

yeah, need to implement something that can support dynamic level of sub pages. The tables are as described:

Section
------------------
id
title

Page
-----------------
id
title
Section_FK
ParentPage_FK (foreign key to self)

0
wll6568
5/5/2009 2:40:22 AM
Reply:

Similar Artilces:

.net + dynamic SQL-query
On our page we have texbox, dropdownlist, database and gridview for it.It DropDownList we have all names of columns from database (in our situation they are Item_Name, Item_Type,  City and Country). In database we have two more columns, but we do not need them in this task.And the task is to choose from DropDownList item/value and deliver it to SQL-query. We have done searching from database, but the column to search from is static, we want to make it dynamic, we want to choose from Dropdownlist column, from which we will search.We are making all in aspx, not in .cs code. We are not fam...

assign SQL to datasource dynamically
Hello,I have a default SQL statement assigned to the datasource: select * from customers. But when I want to dynamically change this at runtime, e.g.: accessdatasource.selectcommand="select * from categories where custCity="&  lblCity.Text (lblcity is in this case NY of which there are plenty fields in my DB) it appears that after the postback this command is lost, the gridview linked to the datasource disappears from the screen....This is my problem and this is what I heard before as an answer:"You only specify the SelectCommand when the button is pressed. When you don't press...

Converting a gridView using an Sql Datasource to a gridview who is not using an SQL DataSource
How can i rewrite this page so that i doesnt make use of an SqlDataSource?  <%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginHistory.ascx.cs" Inherits="Private_UserControls_WebUserControl" %> <html> <head> <%--<link rel="stylesheet" href="BaldwinPortal.css" mce_href="BaldwinPortal.css" type="text/css" />--%> <title>Login History</title> </head> <body style="margin:0 0 0 0;padding:0 0 0 0"> ...

.Net connect process to SQL 2000 sp4
Hello - hopefully an easy one for someone who knows what they are doing...  i have read a number of tutorials, but am completely new to .net.  I am trying to start simple, I would just like to write a code which reads a record from a table, saves the value as a variable, then simply displays the variable on the screen. My server is the local server, has a trusted connection, the SQL database is called UserDB.  The table is called Users.  The column I'd like to read is UserID (contains numeric values, 6 digits) I have included the code below, and the error I receive...

SQL Injection and Dynamic SQL
The consensus on avoiding SQL injection attacks is to pass all your collected data to a stored procedure. If you have to return a result set from a complex form, the answer seems to be to use dynamic SQL. On further study, I discovered that dynamic SQL has a lot of potential pitfalls and low and behold can still be vulnerable to injection attacks. I know that I am not the first person to ever try and collect data from a web form and return a result set, so what are the best practices? Say I have a complex form with about 25 search criteria (most of which are optional), I go through all t...

Dynamic SQL in Sybase SQL
Im trying to create a bit of Dynamic SQL in a Sybase stored procedure, im used to MS SQL Server so im not sure what im doing wrong in Sybase. Heres my bit of code declare @sql varchar(100) declare @sql2 varchar(100) Select @sql = '''0001/100212'',''0001/100218'',''0001/100240'','0001/100243''' select @sql2 = 'select * from table where table_tra_code in (' + @sql + ')' Exec @sql2 now i would have thought this would have executed @sql2 and returned a result set, but no :(. Any ideas?, id...

Dynamic SQL in Transact SQL
Does Dynamic SQL can be done in transact sql format in stored procedure? If yes, any reference can be read? Thx..... ...

gridview, access datasource, dynamic assignment sql statement
I have a gridview "gvTable" and a datasource "accessdatasource1".When I load the page all the data from the table "Models" is displayed.When I click the Categories button I want to have the gridview display the rows from my "Categories" table (which contains columns: ID and CategoryName), on pages of each 5 rows in length.It does display all the info in the right amount of rows.HOWEVER: when I click on the next page or column header to sort I get the error:"System.IndexOutOfRangeException: Cannot find column CategoryName"Here's all my code: <asp:GridView ID="gvTable" runat="server" Allow...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

passing url param to a sql report viewer in .net page
I have report viewer on an asp.net 2.0 page with a Sql report from sql 2005 embedded in the report viewer. I thought I could just put report parameter in the query string and it would just pass the parameter to the report but that did not work. For instance I have a report the has a parameter- IDI thought I could just create a link to the report like myreport.aspx?ID=1234That did not pass the parameter to the report. How can I do that?I don't have any real code just the asp to embed the report <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture...

SqlDataSource configueration depending on URL params and dynamic SQL query
how to configure SqlDataSource  to use WHEN conditions only when required URL param is presented? (not using default param value) for example: URL: index.aspx?paramA=blah&paramB=blooh then to use  SELECT * FROM blooh WHERE paramA='blah' otherwise if no params present - use SELECT * FROM myTable i.e. i want to display ALL records from the table or variant B:  URL: index.aspx?paramA=blah&paramB=blooh then to use  SELECT * FROM blooh WHERE paramA LIKE 'blah' otherwise if no params present - use SELECT * FROM index   is it possible? ...

Gridview sorting
Hi All,  This is not a question but I had to share something I was finally able to figure out and thought it may be helpful to others as well. With the help from Ryan Olshan's website I was able to take what he had and make it work for my needs. The difficulty I had was that I need to dynamically build my SQL statement based on the users selections from the main page. Also because it's Oracle and I don't have access to create stored procedures. Hope this helpful and I signed up because I felt the need to give back to those who helped me via countless Google searches. Note, ...

How to Update when dynamic Select SQL by using SQLDatasouce In .net 2.0?
In Dot net 2.0 we change using SQLDataSource to Conect with SQLDB. Now for My case ,the Select SQL is dynamic when differnece user and parameters to the page, So if I want to Update the data input by user,then I must give Update/insert/delelte SQL to SQLDatasource's InsertCommand /UpdateCommand/DeleteCommand .  How to Generate the Insert/update/delete command for the SQLDataSource ? as in dot net 1.1 can use SQLCommandBuilder to generate it,but SQLCommandBuilder  just support DataAdeptor not for SQLDataSource, Could any body know how to do it when the SelectCommand is dynamic an...

How to play media file from dynamic sql url, possible paid work
Hi, I'm new so please excuse my noobish question.  I did a search and not coming up with anything so any help would be great. I'm trying to play some asx files from a streaming media server that plays off a webpage with wmp embedded by using ashx or dynamic url from sql. I've seen some sites like yahoo, aol, use dyanmic urls such as somesite.com/asx?=1 that plays in wmp ... After looking at the tutorials and searches I'm still at odds on how to do that.  How do you play the querystring to the file in a embedded wmp.  I can make the querystring bu...

Web resources about - Dynamic url structure processing - asp.net.sql-datasource

Analog signal processing - Wikipedia, the free encyclopedia
Analog signal processing is any signal processing conducted on analog signals by analog means. "Analog" indicates something that is mathematically ...

Hyatt warns of malware on its payment-processing system
Hyatt Hotels Corp. says it found malicious software on the computer system that processes customer payments, raising the possibility that hackers ...

Conexant Announces New Audio Processing Solutions At CES
At CES, Conexant gave me a demo of some of the audio processing technology that they've been working on. Conexant is a company that probably ...

Two atoms make quantum memory, processing gate, and test of entanglement
(credit: University of Maryland ) Quantum systems are inherently fragile as any interactions with the outside world can change their state. ...

ImBatch 4.4.0 adds PDF processing support
High Motion Software has shipped ImBatch 4.4.0 , a major update to its free-for-personal-use image batch processing tool. New PDF input support ...

Government "Processing Error" Sinks Housing Reports for Entire Year; Where to From Here?
Huge "Processing Error" in Government Housing Data When I saw some of the upwardly revised GDP estimates in 2015 I thought they were too good ...

Audi turns to Qualcomm power for entertainment, navigation processing
Qualcomm proves its chip-making innovation, announcing a deal at CES where Audi will use its first automotive quality infotainment chipset, the ...

Nvidia Ramps Up Processing Power for Self-Driving Cars
With its new Drive PX 2 platform, the GPU maker is offering a computer that can deliver up to 8 teraflops of computing power to autonomous vehicles. ...

‘Critical flicker fusion’ test can measure the brain’s processing speed
Scientists from the University of Georgia have devised an elegant method of testing the visual sampling rate of the human brain.

A Fusion Of Storage And Processing
Storage devices have microprocessors that allow them to do more than was possible in the past. This advanced processing power is enabling on-board ...

Resources last updated: 1/19/2016 5:44:18 PM