Images and links
am 01.02.2007 15:31:00 von RicardoFurtado
i'm developing a web site in asp .net but i came up with a rookie problem.
How can i insert an image or a link from a database record?
I'm using a table and inside the table i have the following code:
width="78px" height="78px">
|
|
which are invalid instructions. How can i define the src and href for the
image and the link?
My thanks in advanced
Ricardo Furtado
Re: Images and links
am 01.02.2007 15:35:17 von Anthony Jones
"Ricardo Furtado" wrote in
message news:1458A114-EF4F-4ECE-856B-A6493B14BD6F@microsoft.com...
> i'm developing a web site in asp .net but i came up with a rookie problem.
> How can i insert an image or a link from a database record?
> I'm using a table and inside the table i have the following code:
>
> width="78px"
height="78px">
> |
>
>
> |
>
> which are invalid instructions. How can i define the src and href for the
> image and the link?
>
Try <%="viewarticle.aspx " & DR("IdArticle").ToString()%>
For future refrence this Group is for Asp classic not ASP.NET
> My thanks in advanced
>
> Ricardo Furtado
Re: Images and links
am 01.02.2007 15:39:35 von Daniel Crichton
Ricardo wrote on Thu, 1 Feb 2007 06:31:00 -0800:
> i'm developing a web site in asp .net but i came up with a rookie problem.
> How can i insert an image or a link from a database record?
This isn't an ASP.Net newsgroup, it's for classic ASP. You need to post into
one of the groups with dotnet in the name. I'll see if I can help though.
> I'm using a table and inside the table i have the following code:
>
>
width="78px"
> height="78px"> |
You're missing the =, which is the shortcut for Response.Write in ASP (I
guess it's the same in ASP.Net). And you're missing the quotes around the
image link (although most browsers will handle that). Try this.
" width="78px"
height="78px"> |
>
> |
Again, no =. You can do it either of these ways:
|
or
|
However, these are both going to give invalid URLs as you've just put a
space between the aspx URL and the id. Maybe you wanted this:
|
where the viewarticle page reads the "id" querystring value to get the
article id. Replace with the appropriate parameter name.
> which are invalid instructions. How can i define the src and href for the
> image and the link?
Hopefully the above will help.
Dan
Re: Images and links
am 01.02.2007 16:53:04 von RicardoFurtado
Yes, its working now.
the ' and = were missing in <%DR("Image").ToString()%>
the following instruction is the correct one
'<%=DR("Image").ToString()%>'
thank you very much
Ricardo Furtado
"Daniel Crichton" wrote:
> Ricardo wrote on Thu, 1 Feb 2007 06:31:00 -0800:
>
> > i'm developing a web site in asp .net but i came up with a rookie problem.
> > How can i insert an image or a link from a database record?
>
> This isn't an ASP.Net newsgroup, it's for classic ASP. You need to post into
> one of the groups with dotnet in the name. I'll see if I can help though.
>
> > I'm using a table and inside the table i have the following code:
> >
> >
width="78px"
> > height="78px"> |
>
> You're missing the =, which is the shortcut for Response.Write in ASP (I
> guess it's the same in ASP.Net). And you're missing the quotes around the
> image link (although most browsers will handle that). Try this.
>
> " width="78px"
> height="78px"> |
>
> >
> > |
>
> Again, no =. You can do it either of these ways:
>
>
> |
>
> or
>
>
> |
>
>
> However, these are both going to give invalid URLs as you've just put a
> space between the aspx URL and the id. Maybe you wanted this:
>
>
> |
>
> where the viewarticle page reads the "id" querystring value to get the
> article id. Replace with the appropriate parameter name.
>
> > which are invalid instructions. How can i define the src and href for the
> > image and the link?
>
> Hopefully the above will help.
>
> Dan
>
>
>