vinod mishra

vinod mishra

  • NA
  • 39
  • 20.1k

Select more than one Columns through Textbox.

Aug 26 2013 6:14 AM

Sir I want to sent message more than one person at same time but message and column name is typed by user in textbox. below a example.

ColumnName

ColumnAmount

Vinod

500

Ravi

200

Subodh

100

Textbox.Text= "Dear Mr. #ColumnName# Your Bill Amount is #ColumnAmount# Please Paid ".

1-      User enter value in textbox manually.

2-      User want to send the message more than one consumer  on single click.

When user press send buttion the message sent to all consumer who are selected in gridview.



below is my old code whose send predefined message. but now we want to send User Typed message .


my code is ::

        int rowCount = 0;

       StringBuilder gridSelections = new StringBuilder();

        CheckBox chkUpdate = (CheckBox)GridVwHeaderChckboxSrvr.FindControl("chkEmp");

        for (int i = 0; i < GridVwHeaderChckboxSrvr.Rows.Count; i++)

        {

            GridViewRow row = GridVwHeaderChckboxSrvr.Rows[i];

            CheckBox Chbox = (CheckBox)row.FindControl("chkEmp");

            if (Chbox.Checked == true)

            {

                rowCount++;

                XSTR = "http://webleher.com/messageapi.asp?userName=vipindia&password=#######&sender=VIPINDIA&mobile=" + row.Cells[2].Text + "&message=" + TextBox1.Text;                

                Response.Write("<iframe id='iframe" + chkUpdate + "' src='" + XSTR + "' width='25%px' height='50px' marginwidth='0' marginheight='0' hspace='0' vspace='0' frameborder='0' scrolling='no'></iframe>");

                Response.Write("<script language = 'javascript'>alert('Next'); </script>");

               Label1.Text = rowCount.ToString();

                con.Close();

            }

        }



Answers (4)