Passing values from client 2 server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yama

    Passing values from client 2 server

    Hi,

    Simple question:

    Is there a way to a value from client-side to server-side upon a click?

    function _getReport(Repo rtName) { alert(ReportNam e); }

    <asp:datalist id="dlReports" runat="server">
    <itemtemplate >
    <img height="7" src="../ReportsImages/navlink.gif" width="5">
    <a class="Normal" id="<%#
    DataBinder.Eval (Container.Data Item,"Descripti on") %>"
    href="ReportMai nPage.aspx" onclick="return _getReport('<%#
    EncryptString(D ataBinder.Eval( Container.DataI tem,"Descriptio n"))%>');">
    <%# DataBinder.Eval (Container.Data Item,"Descripti on") %></a>
    </itemtemplate>
    </asp:datalist>

    What I would like to accomplish is to pass the report name to server-side
    from client-side upon clicking on a link above.

    Yama


  • Cowboy \(Gregory A. Beamer\)

    #2
    Re: Passing values from client 2 server

    Something like, create a hyperlink column in a DataSet and capture the value
    sent when the person clicks? There are a variety of other controls,
    LinkButton, et al, you can use, as well. Repeater is often better, as you
    have more flexibility, but it really depends on what you need.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    *************** *************** *************** *************** **********
    Think Outside the Box!
    *************** *************** *************** *************** **********
    "Yama" <ykamyar@grandp acificresorts.c om> wrote in message
    news:ePgR80%230 DHA.1740@TK2MSF TNGP12.phx.gbl. ..[color=blue]
    > Hi,
    >
    > Simple question:
    >
    > Is there a way to a value from client-side to server-side upon a click?
    >
    > function _getReport(Repo rtName) { alert(ReportNam e); }
    >
    > <asp:datalist id="dlReports" runat="server">
    > <itemtemplate >
    > <img height="7" src="../ReportsImages/navlink.gif" width="5">
    > <a class="Normal" id="<%#
    > DataBinder.Eval (Container.Data Item,"Descripti on") %>"
    > href="ReportMai nPage.aspx" onclick="return _getReport('<%#
    > EncryptString(D ataBinder.Eval( Container.DataI tem,"Descriptio n"))%>');">
    > <%# DataBinder.Eval (Container.Data Item,"Descripti on") %></a>
    > </itemtemplate>
    > </asp:datalist>
    >
    > What I would like to accomplish is to pass the report name to server-side
    > from client-side upon clicking on a link above.
    >
    > Yama
    >
    >[/color]


    Comment

    • Yama

      #3
      Re: Passing values from client 2 server

      Hi Greg,

      Thank you for your reponse. I would like, once the list is generated, to
      capture the (<%# DataBinder.Eval (Container.Data Item,"Descripti on") %>)
      report name every time the user clicks on a link.

      How can I do that using LinkButton?

      Yama

      "Cowboy (Gregory A. Beamer)" <NoSpamMgbworld @comcast.netNoS pamM> wrote in
      message news:Ouy2l6%230 DHA.832@TK2MSFT NGP09.phx.gbl.. .[color=blue]
      > Something like, create a hyperlink column in a DataSet and capture the[/color]
      value[color=blue]
      > sent when the person clicks? There are a variety of other controls,
      > LinkButton, et al, you can use, as well. Repeater is often better, as you
      > have more flexibility, but it really depends on what you need.
      >
      > --
      > Gregory A. Beamer
      > MVP; MCP: +I, SE, SD, DBA
      >
      > *************** *************** *************** *************** **********
      > Think Outside the Box!
      > *************** *************** *************** *************** **********
      > "Yama" <ykamyar@grandp acificresorts.c om> wrote in message
      > news:ePgR80%230 DHA.1740@TK2MSF TNGP12.phx.gbl. ..[color=green]
      > > Hi,
      > >
      > > Simple question:
      > >
      > > Is there a way to a value from client-side to server-side upon a click?
      > >
      > > function _getReport(Repo rtName) { alert(ReportNam e); }
      > >
      > > <asp:datalist id="dlReports" runat="server">
      > > <itemtemplate >
      > > <img height="7" src="../ReportsImages/navlink.gif" width="5">
      > > <a class="Normal" id="<%#
      > > DataBinder.Eval (Container.Data Item,"Descripti on") %>"
      > > href="ReportMai nPage.aspx" onclick="return _getReport('<%#
      > > EncryptString(D ataBinder.Eval( Container.DataI tem,"Descriptio n"))%>');">
      > > <%# DataBinder.Eval (Container.Data Item,"Descripti on") %></a>
      > > </itemtemplate>
      > > </asp:datalist>
      > >
      > > What I would like to accomplish is to pass the report name to[/color][/color]
      server-side[color=blue][color=green]
      > > from client-side upon clicking on a link above.
      > >
      > > Yama
      > >
      > >[/color]
      >
      >[/color]


      Comment

      Working...