Datagrid and hyper link question?

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: Datagrid and hyper link question?

    Thank you Tim S. It was a help however i still couldn't figure out how to
    fix it? thanx
    "Tim S." <timstall@hotmail.com> wrote in message
    news:017701c339ad$4d605470$a401280a@phx.gbl...
    > I understand you need something like:
    > <a>href="[myPage]?IN=[in_value]&PON=[pon_Value]>[text]</a>
    >
    > where the [ ] are variables.
    >
    > Some ideas:
    > 1). In the code behind, you could create a new column and
    > programmtically concatenate the values to form that Html
    > hyperlink. Then Bind this column to your datagrid.
    >
    > 2). You could use a template column, and concatenate the
    > variables.
    >
    > 3). If the calculatations get very heavy, You could add a
    > linkButton column that calls a function which takes the
    > In,Pon, and other vars as inputs and redirects to a
    > calculated url.
    >
    > Tim S.
    >
    > >-----Original Message-----
    > >Hi, I have a xml which is ..
    > ><Root>
    > ><ProdIDQual>
    > > <ON>111111</ON>
    > > <PON>121212</PON>
    > > <IN>1x1x1x</IN>
    > ></ProdIDQual>
    > ><ProdIDQual>
    > > <ON>222222</ON>
    > > <PON>131313</PON>
    > > <IN>1z1z1z</IN>
    > ></ProdIDQual>
    > ></Root>
    > >
    > >---- I have displayed it on Datagrid with readxml method
    > and works fine. I
    > >am trying to make a hyperlink in datagrid for another
    > page where I need to
    > >pass PON and IN from the upper XML. I user
    > onItemdatabound event to catch IN
    > >but couldn't get the other variable PON.. Is there a way
    > to make a link from
    > >about XML to pass IN and PON? something like <a
    > >href="index.asp?IN=11111&PON=22222222>View</a>
    > >
    > >Thanks...
    > >
    > >KB
    > >
    > >
    > >.
    > >

    k-re Guest

  2. Similar Questions and Discussions

    1. how to use hyper columns in datagrid
      I have set the configuration as the attchment jpg file however,when i click the hyper link , it only show the url as below:...
    2. Remove the underline on hyper link and configure Submitbutton
      Hello, DW always put underline on hyper link. Is there any way on DW that I can take out the underline and replace it with color change when...
    3. Hyper link a flash movie
      Hi, Is there any possibility that we can put a hyperlink on a flash movie just as we put on any gif or jpg image? Thanks,
    4. Hyper Link Problem
      Hi, I have a problem when creating hyper links. The problem is when I create a hyper link the link is splitting into 3 lines. I want the link...
    5. File Download Through Hyper Link?
      I'd like to write to a log whenever a visitor to my site downloads a file. So, I'd like the link they click to be to a php 'page' that returns the...
  3. #2

    Default Re: Datagrid and hyper link question?

    Hello,
    Probably the simplest way is #2:
    >> 2). You could use a template column, and concatenate the
    >> variables.
    The steps to do this:
    1 - add a template column to your datagrid (if you haven't
    used template columns before, just check the MSDN help,
    they're really straight forward).
    2 - the template column lets you create custom HTML for
    each cell, so you could do something like:
    <a>href="<%....%>?IN=<%....%>&PON=<%....%>><%....% ></a>

    3 - I replaced each [var] with a databind expression,
    something like <% ....%> where "..." is the syntax to
    databind (look at databinding to a repeater or datagrid in
    MSDN for the exact syntax, I don't remember it off the top
    of my head).

    That should do it.

    Tim

    >-----Original Message-----
    >Thank you Tim S. It was a help however i still couldn't
    figure out how to
    >fix it? thanx
    >"Tim S." <timstall@hotmail.com> wrote in message
    >news:017701c339ad$4d605470$a401280a@phx.gbl...
    >> I understand you need something like:
    >> <a>href="[myPage]?IN=[in_value]&PON=[pon_Value]>[text]
    </a>
    >>
    >> where the [ ] are variables.
    >>
    >> Some ideas:
    >> 1). In the code behind, you could create a new column
    and
    >> programmtically concatenate the values to form that Html
    >> hyperlink. Then Bind this column to your datagrid.
    >>
    >> 2). You could use a template column, and concatenate the
    >> variables.
    >>
    >> 3). If the calculatations get very heavy, You could add
    a
    >> linkButton column that calls a function which takes the
    >> In,Pon, and other vars as inputs and redirects to a
    >> calculated url.
    >>
    >> Tim S.
    >>
    >> >-----Original Message-----
    >> >Hi, I have a xml which is ..
    >> ><Root>
    >> ><ProdIDQual>
    >> > <ON>111111</ON>
    >> > <PON>121212</PON>
    >> > <IN>1x1x1x</IN>
    >> ></ProdIDQual>
    >> ><ProdIDQual>
    >> > <ON>222222</ON>
    >> > <PON>131313</PON>
    >> > <IN>1z1z1z</IN>
    >> ></ProdIDQual>
    >> ></Root>
    >> >
    >> >---- I have displayed it on Datagrid with readxml
    method
    >> and works fine. I
    >> >am trying to make a hyperlink in datagrid for another
    >> page where I need to
    >> >pass PON and IN from the upper XML. I user
    >> onItemdatabound event to catch IN
    >> >but couldn't get the other variable PON.. Is there a
    way
    >> to make a link from
    >> >about XML to pass IN and PON? something like <a
    >> >href="index.asp?IN=11111&PON=22222222>View</a>
    >> >
    >> >Thanks...
    >> >
    >> >KB
    >> >
    >> >
    >> >.
    >> >
    >
    >
    >.
    >
    Tim S. Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139