开发者

Message after sending mail asp.net

string Emails = ""; foreach (GridViewRow gr in gvregview.Rows) { CheckBox chk = (CheckBox)gr.FindControl("Checked"); Label ID = (Label)gr.FindControl("lblEmail"); Label lbl = (Label)gr.FindControl("lblPass"); Label Lblmrno = (Label)gr.FindControl("Lblmrno"); if (chk.Checked == true) {

                SendMail(ID.Text, lbl.Text);
                //lblmsg.Text = "Mail Sent to "+Lblmrno.Text;
                Response.BufferOutput = true;
                puposalda.MailSentResponse = Lblmrno.Text;
                //Response.Write("Mail to sent to" + Lblmrno.Text);
                System.Threading.开发者_运维技巧Thread.Sleep(500);

            }


        }

Hi Everybody, i want to send mail to all selected users in gridview and display Message 'Mail sent to the user UserName' for each user. Mail is sent successfully but only last user name is displaying. How to do that. Response.write is working but it is displaying message on the top. But i want to display message at specific location.

Thanks Thanks


lblmsg.Text += "Mail Sent to "+Lblmrno.Text+", ";

in that case you ADD the text, not replace it.


I want to replace text not append Text. When mail to the first user has been sent successfully. Then message should display on the page. then same for other users.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜