Results 1 to 10 of 10

Thread: Hyperlink with datagrid…

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Posts
    73

    Hyperlink with datagrid…

    I am using hyperlink field (title) at access 2003 and use datagrid to display this hyperlink in it. But when display datagrid it is give me text and hyperlink like this:
    Click her #../email.aspx#

    and when I click on it, it doesn’t take me to URL

    how can I display text only in datagrid without hyperlink?

    This is the code for datagrid :
    <asp:datagrid id="DataGrid2" style="Z-INDEX: 104; LEFT: 104px; POSITION: absolute; TOP: 184px"
    runat="server" AutoGenerateColumns="False">
    <Columns>
    <asp:HyperLinkColumn DataNavigateUrlField="title" DataTextField="title" NavigateUrl="title"></asp:HyperLinkColumn>
    </Columns>
    </asp:datagrid>

    Could help pls?
    Thanks

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861

    Re: Hyperlink with datagrid…

    Quote Originally Posted by VB+VB=great
    I am using hyperlink field (title) at access 2003 and use datagrid to display this hyperlink in it.

    how can I display text only in datagrid without hyperlink?
    Then don't use a hyperlink column.
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Posts
    73

    Re: Hyperlink with datagrid…

    Thank you for replying.

    I did what u said and i get same result (no change). the field of hyperlink in access gives me like this:
    Click her #../email.aspx#

    I want to display hyperlink(Click her) alone without (#../email.aspx#) and when user click hyperlink it takes him to website (#../email.aspx#)

    I wish I explained my question.

    thanks

  4. #4
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: Hyperlink with datagrid…

    don't use access. lol

    just an observation but #date# is used to pass a string date to access.
    Magiaus

    If I helped give me some points.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Posts
    73

    Re: Hyperlink with datagrid…

    I didn’t use any date in access but when I put hyperlink in access, it displays with this style in datagrid: (#../email.aspx#). How can I disappear URL? and when user click on text, it gives him website (email.aspx)

    Thank u

  6. #6
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Re: Hyperlink with datagrid…

    just parse out the ## .Replace('#','') where ever you pull the field just add that logic
    Magiaus

    If I helped give me some points.

  7. #7
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: Hyperlink with datagrid…

    i had a same issue - search for a topic similar to mine with the sameish thread title....

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Posts
    73

    Re: Hyperlink with datagrid…

    Thank you for reply

    Let me explain my question with another way:

    How can display content of hyperlink field of access in datagrade in asp.net?

    thanks

  9. #9
    Frenzied Member Magiaus's Avatar
    Join Date
    Mar 2002
    Location
    swamp land
    Posts
    1,267

    Arrow Replace("#","")

    all I had to do was do .Replace("#","") when i read the link out of the db.

    PHP Code:
                        linkURL r[1].ToString().Replace("#",""); 
    Unless something else strange happens with a big URL that's all you need. Look at the project.
    Attached Files Attached Files
    Magiaus

    If I helped give me some points.

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Posts
    73

    Re: Hyperlink with datagrid…

    Thank Magiaus

    I downloaded your project and it was wonderful job. But it wrote with c# language which I couldn’t understand it perfectly because I am familiar with vb language, could you please write it with vb language ?

    And also, I faced this problem when I run it:

    Server Error in '/' Application.
    ________________________________________
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

    Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

    Source Error:

    Line 36: "Passport" and "None"
    Line 37: -->
    Line 38: <authentication mode="Windows" />

    The error in number 38

    I appreciate your job, you are genius.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width