Click here to Skip to main content
15,896,063 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: backwards binary compatibility .NET 2.0 Pin
CWIZO22-Feb-06 4:32
CWIZO22-Feb-06 4:32 
GeneralRe: backwards binary compatibility .NET 2.0 Pin
George L. Jackson22-Feb-06 5:42
George L. Jackson22-Feb-06 5:42 
Questionhow to install the proper version of the program depending on the version of the Office? Pin
berlin200519-Feb-06 7:50
berlin200519-Feb-06 7:50 
QuestionopenFileDialog help needed Pin
cindylou1017-Feb-06 12:40
cindylou1017-Feb-06 12:40 
AnswerRe: openFileDialog help needed Pin
digiwombat17-Feb-06 13:34
digiwombat17-Feb-06 13:34 
GeneralRe: openFileDialog help needed Pin
cindylou1020-Feb-06 13:23
cindylou1020-Feb-06 13:23 
QuestionStupid CheckBox Behavior, please help!! Pin
Miguel Lopes17-Feb-06 5:48
Miguel Lopes17-Feb-06 5:48 
AnswerRe: Stupid CheckBox Behavior, please help!! Pin
George L. Jackson17-Feb-06 12:00
George L. Jackson17-Feb-06 12:00 
I checked in both .Net Framework 1.1 and 2.0, and the programmically changing the checkbox value does not fire the CheckedChanged event. The following example demonstrates this. If you toggle the checkbox, the textbox goes from String.Empty to 0 and, subsequently each time the checkbox gets toggled, the number in the textbox gets incremented. However, when you click on the button, the checkbox gets toggled but the textbox does not display the above described behavior.

Framework 2.0
Default.aspx:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox></div>
<div style="margin-top: 10pt;">
<asp:CheckBox ID="CheckBox1" runat="server" AutoPostBack="True" OnCheckedChanged="CheckBox1_CheckedChanged" />
</div>
<div style="margin-top: 10pt;"><asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /></div>
</form>
</body>
</html>

Default.aspx.cs:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
int value = 0;

if (Int32.TryParse(TextBox1.Text, out value))
{
TextBox1.Text = (++value).ToString();
}
else
{
TextBox1.Text = value.ToString();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
CheckBox1.Checked = (CheckBox1.Checked) ? false : true;
}
}




GeneralRe: Stupid CheckBox Behavior, please help!! Pin
George L. Jackson17-Feb-06 12:01
George L. Jackson17-Feb-06 12:01 
AnswerRe: Stupid CheckBox Behavior, please help!! Pin
digiwombat17-Feb-06 12:24
digiwombat17-Feb-06 12:24 
GeneralRe: Stupid CheckBox Behavior, please help!! Pin
Miguel Lopes17-Feb-06 14:27
Miguel Lopes17-Feb-06 14:27 
GeneralRe: Stupid CheckBox Behavior, please help!! Pin
George L. Jackson17-Feb-06 14:53
George L. Jackson17-Feb-06 14:53 
AnswerRe: Stupid CheckBox Behavior, please help!! Pin
peryMimon17-Nov-09 22:43
peryMimon17-Nov-09 22:43 
QuestionKill key strokes while hooked Pin
digiwombat16-Feb-06 18:31
digiwombat16-Feb-06 18:31 
QuestionRe: Kill key strokes while hooked Pin
George L. Jackson17-Feb-06 13:22
George L. Jackson17-Feb-06 13:22 
AnswerRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 13:33
digiwombat17-Feb-06 13:33 
GeneralRe: Kill key strokes while hooked Pin
George L. Jackson17-Feb-06 13:33
George L. Jackson17-Feb-06 13:33 
QuestionRe: Kill key strokes while hooked Pin
[Marc]17-Feb-06 13:46
[Marc]17-Feb-06 13:46 
AnswerRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 14:08
digiwombat17-Feb-06 14:08 
GeneralRe: Kill key strokes while hooked Pin
Dave Kreskowiak17-Feb-06 14:59
mveDave Kreskowiak17-Feb-06 14:59 
GeneralRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 17:16
digiwombat17-Feb-06 17:16 
GeneralRe: Kill key strokes while hooked Pin
digiwombat17-Feb-06 18:06
digiwombat17-Feb-06 18:06 
GeneralRe: Kill key strokes while hooked Pin
Dave Kreskowiak18-Feb-06 3:33
mveDave Kreskowiak18-Feb-06 3:33 
GeneralRe: Kill key strokes while hooked Pin
digiwombat18-Feb-06 10:40
digiwombat18-Feb-06 10:40 
Questionflash with .net Pin
Vineet Rajan16-Feb-06 6:15
Vineet Rajan16-Feb-06 6:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.