1 Replies - 1123 Views - Last Post: 02 December 2014 - 02:13 PM

#1 Smedleyja  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 24
  • Joined: 10-July 11

A couple of Web Form questions about Saving and Button colors

Posted 02 December 2014 - 02:03 PM

I looked up a few ways to learn how to be able to save the web forms I'm creating and followed the instructions but my save button won't let me click on it nor does it work of course. Any ideas? I've tried a few different ones and can't get any of them to work as of now.

Any help is appreciated.

Also, I want to be able to click the buttons and change the color and click them again and change them back. I've been trying to figure this out as well. I can get them to change to one color but not back to its original color.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Bills
{
    public partial class Bills : Form
    {
        public Bills()
        {
            InitializeComponent();
            btnsave.Enabled = false;
        }

        private void btnOutofAccount_Click(object sender, EventArgs e)
        {
            this.btnOutOfAccount.BackColor = Color.Black;
            this.btnOutOfAccount.ForeColor = Color.White;
        }

        private void btnPaid_Click(object sender, EventArgs e)
        {
            this.btnPaid.BackColor = Color.Black;
            this.btnPaid.ForeColor = Color.White;
        }

        private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
            string name = saveFileDialog1.FileName;
            File.WriteAllText(name, "test");
        }

        private void btnsave_Click(object sender, EventArgs e)
        {
            saveFileDialog1.ShowDialog();
        }
    }
}




Is This A Good Question/Topic? 0
  • +

Replies To: A couple of Web Form questions about Saving and Button colors

#2 andrewsw  Icon User is online

  • lashings of ginger beer
  • member icon

Reputation: 6333
  • View blog
  • Posts: 25,535
  • Joined: 12-December 12

Re: A couple of Web Form questions about Saving and Button colors

Posted 02 December 2014 - 02:13 PM

Quote

but my save button won't let me click on it

Are you saying that you are unable to push the button down? This normally indicates that another element is sitting above the button.

If you are able to push it, then are there errors?

Topic moved to WebForms forum.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1