| | |
Variable URLs from SQL Table
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
Hello All,
I'm sure this is an easy one for you all, but pardon...I'm kinda new at this.
What I'm trying to do is store a URL in a SQL table using a text field. This is working successfully and as planned.
The heart of the issue:
I have 200 products, each have 4 different files to associate with that product (drawings...dwg, pdf, igs and dxf files) that I need to direct our users to.
I plan on placing all the files in the same directory so structure won't be a problem, and I hope to use the ['ProdNum'] value from the database to identify the filename via variable.
How would you suggest doing this in a feasable manner? I could type each url out (which is about 100 char ea) * 800 files = 8,000 characters (aka chances for a typo).
Is there a way I could copy/paste to each of the cells in the DB a script or a way of pulling the ['Prodnum'] value and inserting it into the <a href> statement?
<a href="down.xyz.com/['Products.ProdNum'].["Products.ColumnName']">['Products.ColumnName']</a> <-- something like that?
Jon
I'm sure this is an easy one for you all, but pardon...I'm kinda new at this.
What I'm trying to do is store a URL in a SQL table using a text field. This is working successfully and as planned.
The heart of the issue:
I have 200 products, each have 4 different files to associate with that product (drawings...dwg, pdf, igs and dxf files) that I need to direct our users to.
I plan on placing all the files in the same directory so structure won't be a problem, and I hope to use the ['ProdNum'] value from the database to identify the filename via variable.
How would you suggest doing this in a feasable manner? I could type each url out (which is about 100 char ea) * 800 files = 8,000 characters (aka chances for a typo).
Is there a way I could copy/paste to each of the cells in the DB a script or a way of pulling the ['Prodnum'] value and inserting it into the <a href> statement?
<a href="down.xyz.com/['Products.ProdNum'].["Products.ColumnName']">['Products.ColumnName']</a> <-- something like that?
Jon
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
•
•
•
•
Originally Posted by cutepinkbunnies
I plan on placing all the files in the same directory so structure won't be a problem, and I hope to use the ['ProdNum'] value from the database to identify the filename via variable.
How would you suggest doing this in a feasable manner? I could type each url out (which is about 100 char ea) * 800 files = 8,000 characters (aka chances for a typo).
Type each URL out? Why? Where? You say the URL is already in the database.
•
•
•
•
Is there a way I could copy/paste to each of the cells in the DB a script or a way of pulling the ['Prodnum'] value and inserting it into the <a href> statement?
"way of pulling the ['Prodnum'] value and inserting it into the <a href> statement? " Use a SQL query. Use the data retrieved to set the value of your Link object(s).
Sorry, you're going to need to be clearer and more specific.
Tgreer,
Thank you for your reply. I was a little unclear in the initial post.
Basically I have a SQL table which store some products, and in that table some of the columns are called PDF, DWG, IGS, DXF for the different drawings (for the engineers).
Basically, I'd like to make some kind of script that is ultra-low maintenance where our designers can add our products to the database and not have to worry about some big schindig of a URL. So is there a way I can setup a "default value" for the cell to be like the URL listed in my OP? That way its automatically displayed in my gridview control and as long as a file is there the user will be prompted to download.
I guess it wouldn't be that terrible to have to run the query every time a new product is added, it would just make my/everyone else's life easier
.
Jon
Thank you for your reply. I was a little unclear in the initial post.
Basically I have a SQL table which store some products, and in that table some of the columns are called PDF, DWG, IGS, DXF for the different drawings (for the engineers).
Basically, I'd like to make some kind of script that is ultra-low maintenance where our designers can add our products to the database and not have to worry about some big schindig of a URL. So is there a way I can setup a "default value" for the cell to be like the URL listed in my OP? That way its automatically displayed in my gridview control and as long as a file is there the user will be prompted to download.

I guess it wouldn't be that terrible to have to run the query every time a new product is added, it would just make my/everyone else's life easier
.Jon
![]() |
Similar Threads
- how to create a sql table through coding in vb.net (IT Professionals' Lounge)
- Convert XML data to sql table through coding in ASP.Net2.0 (IT Professionals' Lounge)
- how to upload a ms word file and store it in sql table (ASP.NET)
- Send all items in a listBox to SQL server database table (ASP.NET)
- question about connecting odbc to sql through php script (PHP)
- run sql statement in asp (ASP)
Other Threads in the ASP.NET Forum
- Previous Thread: datagrid in asp.net
- Next Thread: Saving information from .NET webcontol into access(database)
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances asp asp.net beginner box browser businesslogiclayer button c# cac checkbox class commonfunctions compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv gridview gudi iis javascript list listbox login menu microsoft mouse mssql nameisnotdeclared news novell numerical opera order panelmasterpagebuttoncontrols problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security serializesmo.table sessionvariables silverlight smoobjects software sql sql-server sqlserver2005 ssl tracking treeview validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming webservice wizard xsl youareanotmemberofthedebuggerusers






