Click here to Skip to main content
16,006,065 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: ShowDialog from another thread, C# Pin
Joshua Quick22-Feb-06 22:38
Joshua Quick22-Feb-06 22:38 
GeneralRe: ShowDialog from another thread, C# Pin
luddet23-Feb-06 0:33
luddet23-Feb-06 0:33 
QuestionConversion problem Pin
PKKSuomi21-Feb-06 21:56
PKKSuomi21-Feb-06 21:56 
QuestionOpening another panel on top orignal panel using Buttons Pin
mjorg20-Feb-06 7:36
mjorg20-Feb-06 7:36 
QuestionJava/NET Dataset Pin
LimeyRedneck20-Feb-06 6:02
professionalLimeyRedneck20-Feb-06 6:02 
AnswerRe: Java/NET Dataset Pin
George L. Jackson21-Feb-06 13:54
George L. Jackson21-Feb-06 13:54 
GeneralRe: Java/NET Dataset Pin
LimeyRedneck21-Feb-06 17:48
professionalLimeyRedneck21-Feb-06 17:48 
AnswerRe: Java/NET Dataset Pin
George L. Jackson22-Feb-06 0:43
George L. Jackson22-Feb-06 0:43 
GeneralRe: Java/NET Dataset Pin
LimeyRedneck22-Feb-06 5:09
professionalLimeyRedneck22-Feb-06 5:09 
Questionbackwards binary compatibility .NET 2.0 Pin
dorwin19-Feb-06 10:04
dorwin19-Feb-06 10:04 
AnswerRe: backwards binary compatibility .NET 2.0 Pin
CWIZO21-Feb-06 3:46
CWIZO21-Feb-06 3:46 
JokeRe: backwards binary compatibility .NET 2.0 Pin
George L. Jackson22-Feb-06 0:49
George L. Jackson22-Feb-06 0:49 
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 

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.