Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > image control - no navigateurl ?

Reply
Thread Tools

image control - no navigateurl ?

 
 
euan@madprops.org
Guest
Posts: n/a
 
      11-12-2005
Hey guys,

I am just playing around with asp.net 2.0 and I was reading about the
image control (for mobile designer) and thought that would be handy.

So I have created:

Do While intImgRatingCount < intImgRating
intImgRatingCount += 1
Dim myimg As New Image
myimg.ImageUrl = "images/images.jpg"
myimg.AlternateText = "Rating " & intImgRatingCount
Form.Controls.Add(myimg)
Loop

And I would like to bind a link to each image. Apparently there should
be a method of navigateurl?

Should this be available? Does anyone know?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?dGlta2xpbmc=?=
Guest
Posts: n/a
 
      11-12-2005
Hi Euan,

System.Web.UI.MobileControls.Image does have a NavigateUrl property.
System.Web.UI.Webcontrols.Image does not have a NavigateUrl property.

Double check you are using the correct class.

Tim


"(E-Mail Removed)" wrote:

> Hey guys,
>
> I am just playing around with asp.net 2.0 and I was reading about the
> image control (for mobile designer) and thought that would be handy.
>
> So I have created:
>
> Do While intImgRatingCount < intImgRating
> intImgRatingCount += 1
> Dim myimg As New Image
> myimg.ImageUrl = "images/images.jpg"
> myimg.AlternateText = "Rating " & intImgRatingCount
> Form.Controls.Add(myimg)
> Loop
>
> And I would like to bind a link to each image. Apparently there should
> be a method of navigateurl?
>
> Should this be available? Does anyone know?
>
>

 
Reply With Quote
 
 
 
 
euan@madprops.org
Guest
Posts: n/a
 
      11-13-2005
Ah thanks Tim. Yeah was wondering if WebControls had a NavigateUrl
property. Well... that sucks. I guess I can just create an image and
put in inside a link.

 
Reply With Quote
 
Patrick.O.Ige
Guest
Posts: n/a
 
      11-13-2005
You can do :-
<asp:HyperLinkColumn Target="_blank" DataNavigateUrlField="ID"
DataNavigateUrlFormatString="test.aspx?ID={0}"
Text="<img border='0' src='/urimage.gif'
/>"></asp:HyperLinkColumn>
Do the binding as you want.
Patrick


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Ah thanks Tim. Yeah was wondering if WebControls had a NavigateUrl
> property. Well... that sucks. I guess I can just create an image and
> put in inside a link.
>



 
Reply With Quote
 
fabio.medeiros fabio.medeiros is offline
Junior Member
Join Date: Sep 2007
Posts: 1
 
      09-21-2007
try this:

Code:
    Dim myLink As New HyperLink

    With myLink
        .NavigateUrl = "http://www.asp.net"
        .Target = "_blank"
        .ImageUrl = ResolveUrl("~/Pictures/image.gif")
        .Text = "Asp.net web site"
    End With
ok?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET TreeView control bug with NavigateUrl and Target PerG ASP .Net Web Controls 0 05-27-2008 07:25 AM
How can I change the NavigateUrl inside the user control ? jeanluc.praz@gmail.com ASP .Net 1 03-08-2006 02:22 AM
HyperLink control; NavigateUrl; IE vs. Mozilla Arthur Dent ASP .Net Web Controls 1 09-30-2005 06:48 PM
undesired behavior in setting hyperlink .NavigateURL property Boban Dragojlovic ASP .Net 3 10-29-2003 09:05 PM
NavigateUrl problem Helixpoint ASP .Net 0 07-22-2003 05:42 PM



Advertisments