no link rendered in an HyperLinkField column with July version???

Last post 04-22-2006 11:03 AM by tstanley. 9 replies.

Sort Posts:

  • Crying [:'(] no link rendered in an HyperLinkField column with July version???

    07-24-2005, 9:51 AM
    • Loading...
    • Willgart
    • Joined on 06-18-2002, 6:04 AM
    • Posts 69
    Hi,

    again a problem after my upgrade to the July version of VS.

    All my grids with an HyperLinkField column don't render the Hyperlink!!!
    the href part of the <a> tag is not here in the HTML code.

    My Href is a javascript command:

    <asp:HyperLinkField DataNavigateUrlFields="ProjectID" DataNavigateUrlFormatString="javascript:OpenProject({0})"

    DataTextField="ProjectName" HeaderText="Project" SortExpression="ProjectName">

    </asp:HyperLinkField>

    in the june version all works fine.
    but if I remove the javascript: in the format string, then the link is render properly.

    there is anything to do?

    thanks.

  • Re: no link rendered in an HyperLinkField column with July version???

    07-24-2005, 10:26 AM
    • Loading...
    • Willgart
    • Joined on 06-18-2002, 6:04 AM
    • Posts 69
    just another point...
     if I convert to a templated column, then the hyperlink is correctly formatted.
    (without any manual code, just click on "convert to template")
  • Re: no link rendered in an HyperLinkField column with July version???

    07-25-2005, 1:19 PM
    • Loading...
    • ninatang
    • Joined on 07-14-2004, 4:41 PM
    • Posts 115
    • AspNetTeam
    This is due to a security change introduced after Beta2 for ImageField and HyperLinkField to remove the src/href if the data was potentially malicious. You can work around this change by using a TemplateField instead.
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Tongue Tied [:S] Re: no link rendered in an HyperLinkField column with July version???

    07-25-2005, 1:24 PM
    • Loading...
    • Willgart
    • Joined on 06-18-2002, 6:04 AM
    • Posts 69
    Ok

    good reason, but does it possible to disable this type of constraints for an intranet usage?
    Changing to templated column disallow the usage of the callback feature in my grids.
  • Re: no link rendered in an HyperLinkField column with July version???

    07-25-2005, 2:53 PM
    • Loading...
    • ninatang
    • Joined on 07-14-2004, 4:41 PM
    • Posts 115
    • AspNetTeam

    Unfortunately, it was too late in the product cycle to consider adding a property to turn this feature on/off.

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Surprise [:O] Re: no link rendered in an HyperLinkField column with July version???

    07-25-2005, 3:03 PM
    • Loading...
    • Willgart
    • Joined on 06-18-2002, 6:04 AM
    • Posts 69
    ok,
    no problem, I'll change my code, or I'll create my own column definition.
  • Re: no link rendered in an HyperLinkField column with July version???

    12-08-2005, 1:21 PM
    • Loading...
    • NotJason
    • Joined on 12-08-2005, 6:18 PM
    • Posts 5
    It seems to me that if it was too late to add the feature to turn it off, then it was too late to add the feature in the first place. I'm getting really tired of half-done software releases...
  • Re: no link rendered in an HyperLinkField column with July version???

    03-06-2006, 11:07 PM
    Are there any plans to update this behavior in Service Pack 1?

    In the mean time, what is the currently recommended "best practice" for launching a popup window (with dynamic url information) from a gridview?

    -Joel
  • Re: no link rendered in an HyperLinkField column with July version???

    04-21-2006, 5:26 PM
    • Loading...
    • tstanley
    • Joined on 04-26-2005, 9:32 PM
    • Posts 50

    Check out this post from Jonas Stawski on a workaround using a <asp:BoundField> control:

    http://aspsoft.blogs.com/jonas/2006/04/gridview_hyperl.html

    I tried this and modified the javascript to a window.open function.  It works, but when the child page opens, the parent page is blanked except for the text "[object]".  If I refresh the parent page, it then says "null".

    Here is my javascript code:

    <a href=javascript:window.open('Temp.aspx','_blank','left=400,top=100,height=250,width=250,status=no,resizable=no,scrollbars=no,toolbar=no,location=no,menubar=no');</a>"

    Any ideas here?

    PS I see that this is an old post.  Did you have any luck on the original problem?

    Thanks.

    Tom Stanley

  • Re: no link rendered in an HyperLinkField column with July version???

    04-22-2006, 11:03 AM
    • Loading...
    • tstanley
    • Joined on 04-26-2005, 9:32 PM
    • Posts 50

    Forgot where I found the answer, but here it is:

    <a href=var&nbsp;popup=window.open(........

    So, the new window (here 'popup') must be declared as a var in the javascript.

     

Page 1 of 1 (10 items)
Microsoft Communities
Page view counter