Button Column Select.

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

    #16
    Re: Button Column Select.

    On May 21, 9:52 pm, "Alexey Smirnov" <alexey.smir... @gmail.comwrote :
    "Alexey Smirnov" <alexey.smir... @gmail.comwrote in message
    >
    news:1179773243 .348157.267380@ a26g2000pre.goo glegroups.com.. .
    >
    Response.Write "select * from dbo.DashBoard where Name = '" +
    ((LinkButton) e.Item.Cells[0].Controls[0]).Text + "'";
    >
    Response.Write( ); should be with the parentheses
    Hi Alexey,
    When I try:
    Response.Write( "select*fro m dbo.DashBoard where Name="+
    ((LinkButton)e. Item.Cells[0].Controls[0]).Text+"");
    It returns select*from dbo.DashBoard where Name=Claude
    Claude is the selected Name which is ok.
    But when I now try
    myCommand.Param eters["@operation "].Value=
    ((LinkButton)e. Item.Cells[0].Controls[0]).Text;
    Data is not selected why is it so?
    But I do not get any error.
    Thanks.


    Comment

    • Alexey Smirnov

      #17
      Re: Button Column Select.

      On May 22, 7:50 am, rcoco <nclau...@yahoo .cawrote:
      On May 21, 9:52 pm, "Alexey Smirnov" <alexey.smir... @gmail.comwrote :"Alexey Smirnov" <alexey.smir... @gmail.comwrote in message
      >
      news:1179773243 .348157.267380@ a26g2000pre.goo glegroups.com.. .
      >
      Response.Write "select * from dbo.DashBoard where Name = '" +
      ((LinkButton) e.Item.Cells[0].Controls[0]).Text + "'";
      >
      Response.Write( ); should be with the parentheses
      >
      Hi Alexey,
      When I try:
      Response.Write( "select*fro m dbo.DashBoard where Name="+
      ((LinkButton)e. Item.Cells[0].Controls[0]).Text+"");
      It returns select*from dbo.DashBoard where Name=Claude
      Claude is the selected Name which is ok.
      But when I now try
      myCommand.Param eters["@operation "].Value=
      ((LinkButton)e. Item.Cells[0].Controls[0]).Text;
      Data is not selected why is it so?
      But I do not get any error.
      Thanks.
      Go to your database and execute this sql statement

      select * from dbo.DashBoard where Name='Claude'

      What result do you receive?

      Comment

      • rcoco

        #18
        Re: Button Column Select.

        Thanks Alexey,
        I Found out the solution I had To write:
        myCommand.Comma ndText="select * from dbo.DashBoard where Name Like
        @billing";
        myCommand.Param eters.Add(new SqlParameter("@ billing",SqlDbT ype.VarChar,
        50));
        myCommand.Param eters["@billing"].Value=
        ((LinkButton)e. Item.Cells[0].Controls[0]).Text;
        It worked properly with out any problem.
        Thank you very very much You are such a nice person you helped me a
        lot.
        Have a nice day.

        Comment

        • Alexey Smirnov

          #19
          Re: Button Column Select.

          On May 25, 10:59 am, rcoco <nclau...@yahoo .cawrote:
          Thanks Alexey,
          I Found out the solution I had To write:
          myCommand.Comma ndText="select * from dbo.DashBoard where Name Like
          @billing";
          myCommand.Param eters.Add(new SqlParameter("@ billing",SqlDbT ype.VarChar,
          50));
          myCommand.Param eters["@billing"].Value=
          ((LinkButton)e. Item.Cells[0].Controls[0]).Text;
          It worked properly with out any problem.
          Thank you very very much You are such a nice person you helped me a
          lot.
          Have a nice day.
          Hej, great! You see, it was not that difficult to get it working :-)

          Comment

          Working...