Skip to content

Asp.Net windows forms

lokesh sri

lokesh sri

Asked Jul 24, 2014, 12:06 AM EDT4 answers
Share
LinkedInX
i want to see the message that it is successfully saved are added , to that what is the code i want write , after inserting all the details finally after clicking add button in windows form i want to see the above requirement please help me with that code

4 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    use message box to prompt 'successfully saved' message. 

    if you can post your code, what you want to achieve I can share my views better.

    twitter @sumitjolly
    0
  • 0
    Hi Lokesh,
    To display success message in asp.net like window form, use following below code

    string display = "Pop-up!"; ClientScript.RegisterStartupScript(this.GetType(), "yourMessage", "alert('" + display + "');", true);
    In windows
    MessageBox.Show("caption","Message");
    kindly mark as answer, if it helps you.

    Thanks
    Kailash
    0
  • lokesh sri
    0
    C#
           CashBAL cashbal = new CashBAL();
            CouponsDTO coupons = new CouponsDTO();
    
    
    
            public AddCoupons()
            {
                InitializeComponent();
            }
    
    
            private void btnAdd_Click(object sender, EventArgs e)
            {
                coupons.CouponCode = txtcouponcode.Text;
                coupons.DiscountPercentage = Convert.ToInt32(txtdiscountpercentage);
                coupons.ExpiryDate = Convert.ToDateTime(dateTimeExpirydate);
                coupons.CuponDescription = textDiscount.Text;
                string Opertion  = "Insert";
    0
  • lokesh sri
    0
    public partial class AddCoupons : Form { CashBAL cashbal = new CashBAL(); CouponsDTO coupons = new CouponsDTO(); CouponsDetails obj = new CouponsDetails(); public AddCoupons() { InitializeComponent(); } private void btnAdd_Click(object sender, EventArgs e) { bool Add = false; coupons.CouponCode = txtcouponcode.Text; coupons.DiscountPercentage = Convert.ToInt32(txtdiscountpercentage); coupons.ExpiryDate = Convert.ToDateTime(dateTimeExpirydate); coupons.CuponDescription = textDiscount.Text; string Opertion = "Insert";
    0