The problem that im having is that its not keeping the data i have selected from the ddl in the message box and so not forwarding the message to the gateway client (im sending SMS messages from my ASP.NET). It keeps on just sending the first (default selection from the text box)<BR><BR>I posted already but couldnt figure out how to get it working. If anyone could take a look at my code and fit the appropriate code in the right places i would be eternally greatful!!!<BR><BR>I know my code is messy but im just trying to get my head around ASP.NET, you gotta learn somehow :o)<BR><BR>thanks,<BR><BR>k.<BR><BR>************** ****************************<BR><BR><BR> private void Page_Load(object sender, System.EventArgs e)<BR> {<BR> string connString = "data source=INDUS;initial catalog=101724355;Integrated Security=SSPI" ; <BR> System.Data.SqlClient.SqlConnection conn = new System.Data.SqlClient.SqlConnection(connString);<B R> conn.Open();<BR> if (Page.IsPostBack)<BR> {<BR>// Response.Write("hi");<BR> //template = ddlSelectTemplate.SelectedItem.Text.ToString();<BR > <BR> template = ddlSelectTemplate.SelectedItem.Value;<BR> <BR> //strMessage = ddlSelectTemplate.SelectedItem.Text.ToString();<BR > if (chkTemplate.Checked)<BR> <BR> {<BR> <BR> txtMessage.Text = template;<BR> chkTemplate.Enabled= false;<BR> //Label4.Text = template;<BR> //template = Label4.Text;<BR> <BR> }<BR> else<BR> <BR> Teacher = ddlTeacherList.SelectedItem.Value.ToString();<BR>< BR> }<BR> // Put user code to initialize the page here<BR> <BR> <BR> string commandString = "SELECT TEMPLATE_CONTENT from TEMPLATE;";<BR> // string connectionString = "data source=INDUS;initial catalog=101724355;Integrated Security=SSPI" ; <BR> // string commandString = "select Mobile_Number from CHILD_DETAILS where TEACHER_NAME like &#039;Kieran Nolan&#039;"; <BR> <BR> System.Data.SqlClient.SqlCommand comm = new SqlCommand(commandString, conn); <BR> System.Data.SqlClient.SqlDataReader storeReader = comm.ExecuteReader(); <BR> ArrayList storesArray = new ArrayList();<BR><BR><BR><BR> //storesArray.Add("-- Select template --");<BR> while(storeReader.Read())<BR> {<BR> storesArray.Add(storeReader.GetString(0));<BR> }<BR><BR> storeReader.Close();<BR><BR> ddlSelectTemplate.DataSource = storesArray;<BR> ddlSelectTemplate.DataBind();<BR><BR>}<BR><BR><BR> private void butOneOnly_Click(object sender, System.EventArgs e)<BR> {<BR> SMSClient gw = new SMSClient(); <BR> gw.Username = "kn"; // your username <BR> gw.Password = "******"; // your password <BR> gw.PrimaryGateway = ""; <BR> <BR> strMessage = txtMessage.Text;<BR> //Label4.Text = strMessage;<BR><BR> PSWinCom.Gateway.Client.Message m = new PSWinCom.Gateway.Client.Message(); <BR> m.ReceiverNumber = strNumber; <BR> m.Text = strMessage; <BR> //m.Text = template;<BR> m.RequestReceipt = false; // Set to true for receipt<BR> m.SenderNumber = "SComm";<BR> gw.Messages.Add(1, m); <BR> //Add message object to Messages collection of client object <BR> //PSWinCom.Gateway.Client.Message n = new PSWinCom.Gateway.Client.Message(); <BR> //n1.Text = strMessage;<BR> //n1.ReceiverNumber = strBulk;<BR> //gw.Messages.Add(2, n1);<BR> //Send all messages in Messages collection. This method is blocking. After completed, <BR> //each message will have Status updated to reflect the result of send-operation. <BR> gw.SendMessages(); <BR> //Reference will only be available if activated on account. <BR> //txtTraceLog.Text += "Message done. Status=" + m.Status.ToString() + " Reference=" + m.Reference + "
";<BR><BR> <BR> txtMessage.Text = "";<BR> txtNumber.Text = "";<BR> ////txtBulkNumber.Text = "";<BR> //conn.Close(); <BR> }<BR>