Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

Thanks so much for having a place for us propeller heads to hang out and chat.

Geography

Where in the world do Tek-Tips members come from?

how to store url and file path in database in asp.net

jamin20 (Programmer)
4 Jul 12 12:01
Hi all
I need to save the links of some attachements.
These links can be either URL (fileupload control) or Filepath (copy/paste in textbox).
Shall I store URL and FilePath in same field of the same table and render them in the same grid or not ?
Piece of advice + piece of code would be higly appreciated.
Jamin
jbenson001 (Programmer)
4 Jul 12 18:08
I'm not sure what you are trying to do. Saving the URL in a "URL" column makes sense, because if it is an image, you can show the image in a grid, repeater, or what ever control. Storing a file path doesn't make sense unless it is the file path on the server. You won't be able to render say, an image, from a local machine running the page.
Since I don't know exactly what your page is doing, I would say just create one column in your table to store the URL / Filepath.
jamin20 (Programmer)
5 Jul 12 4:36
Hi,
thx for your answer.
What I try to do is:
- to store information related to attachments (can be a file or a url)
- to display the links (listed in a grid) that when clicked will displayed (in a separate window) the corresponding attachment.
My idea is to save the links in a table, when user clicks a link which is:
- a URL then the webpage is opened
- a file path or path server then the file is displayed.
thx
Jamin

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close