I'm trying to code this function that toggles the System.Web.UI.Controls.Enabled property.
I could actually read a TextBox off a Webpage, that is NOT embedded, however, I couldn't "reach" the Button embedded within the FormView (ID=Envelope)
protected void btnEdit_Click(object sender, EventArgs e)
{
toggleButton_Enabled("btnSave", true);
}
private void toggleButton_Enabled(String _ButtonID, Boolean _enable)
{
Button mpButton = new Button();
mpButton = (Button)this.FindControl(_ButtonID);
mpButton = (Button)FindControl(_ButtonID);
if (mpButton != null && mpButton.Enabled)
{
mpButton.Enabled = false;
}
else if (mpButton != null && !(mpButton.Enabled))
{
mpButton.Enabled = true;
}
else if (mpButton != null && _enable)
{
mpButton.Enabled = false;
}
else if (mpButton == null)
{
throw new Exception(mpButton.ToString() + "is null");
}
}
I'm using VS 2008 / Win XP SP 3 / .NET 3.5 SP 1. Complete source code
here. Screenshots
here.
I'm following
this MSDN article.
:confused:
Version information
Microsoft Visual Studio 2008
Version 9.0.21022.8 RTM
Microsoft .NET Framework
Version 3.5 SP1
Installed Edition: Professional
Microsoft Visual Basic 2008 91605-270-9885354-60939
Microsoft Visual Basic 2008
Microsoft Visual C# 2008 91605-270-9885354-60939
Microsoft Visual C# 2008
Microsoft Visual C++ 2008 91605-270-9885354-60939
Microsoft Visual C++ 2008
Microsoft Visual Studio 2008 Tools for Office 91605-270-9885354-60939
Microsoft Visual Studio 2008 Tools for Office
Microsoft Visual Web Developer 2008 91605-270-9885354-60939
Microsoft Visual Web Developer 2008
Crystal Reports AAJ60-G0MSA4K-68000CF
Crystal Reports Basic for Visual Studio 2008
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB944899) KB944899
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB945282) KB945282
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946040) KB946040
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946308) KB946308
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946344) KB946344
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB946581) KB946581
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947171) KB947171
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947173) KB947173
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947180) KB947180
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947540) KB947540
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB947789) KB947789
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB948127) KB948127
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB953256) KB953256
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB971091) KB971091
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB973674) KB973674
This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http:
PowerCommands for Visual Studio 2008 1.0
A set of power commands for Visual Studio 2008
Update for Microsoft Visual Studio 2008 Professional Edition - ENU (KB972221) KB972221
This update is for Microsoft Visual Studio 2008 Professional Edition - ENU.
If you later install a more recent service pack, this update will be uninstalled automatically.
For more information, visit http:
<pre>