Peter Chan
asked on
Align the buttons to the same position
ASKER
In code-behind, I cannot choose this
btn1.Left
ps. You need to replace btn1 and btn2 (button1 and button2) with the real names of the buttons in your code.
ASKER
Sorry, in VS 2013, I get these
Error 3 'System.Web.UI.WebControls .Button' does not contain a definition for 'Left' and no extension method 'Left' accepting a first argument of type 'System.Web.UI.WebControls .Button' could be found (are you missing a using directive or an assembly reference?) C:\App12\App12\Default.asp x.cs 443 23 App12
Error 4 'System.Web.UI.WebControls .Button' does not contain a definition for 'Left' and no extension method 'Left' accepting a first argument of type 'System.Web.UI.WebControls .Button' could be found (are you missing a using directive or an assembly reference?) C:\App12\App12\Default.asp x.cs 443 43 App12
due to this line
Error 3 'System.Web.UI.WebControls
Error 4 'System.Web.UI.WebControls
due to this line
bt_ite.Left = bt_obj.Left;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've requested that this question be deleted for the following reason:
The program does need the help regarding ASP page but the answers are just related to C# forms.
The program does need the help regarding ASP page but the answers are just related to C# forms.
As pointed out in my previous comment, it does not seem to be possible with a web button. No, you can't do that is a valid answer to a question. (In the help files there are only width and height properties).
Also suggested is a method that would align buttons should it be suitable.
Also suggested is a method that would align buttons should it be suitable.
ASKER
Andy,
The way you were talking about, is only applicable to C# form, but it is not for ASP page at all. This is the point!
The way you were talking about, is only applicable to C# form, but it is not for ASP page at all. This is the point!
>>The way you were talking about, is only applicable to C# form, but it is not for ASP page at all.
What I see here is the question area of .net programming with extra topics areas of .NET, C# Programming Language, Components - nothing about ASP or web.
When you later point out it is a WebButton (in the error message) then it is clear why my first suggestion isn't applicable. That is why I made a further comment about it apparently not being possible to do what you asked for. (Which is a valid answer, some questions can not be answered by yes as much as one would want them to be).
I'll abide by what a moderator decides.
What I see here is the question area of .net programming with extra topics areas of .NET, C# Programming Language, Components - nothing about ASP or web.
When you later point out it is a WebButton (in the error message) then it is clear why my first suggestion isn't applicable. That is why I made a further comment about it apparently not being possible to do what you asked for. (Which is a valid answer, some questions can not be answered by yes as much as one would want them to be).
I'll abide by what a moderator decides.
btn2.Left = btn1.Left;