473,545 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

adding runat=server to a control on aspx page, don't cause the IDE to add the control to the code behind

Hi,

adding a control with runat=server to an aspx page (using code - not
designer view) - don't cause the control to be added to the code behind (.cs
ot .vb file)

only if i change the aspx view to designer and then to the HTML view again,
the code behing is changed to add the controls with runat=server property.

is there a way using the IDE commands to run this command that the IDE is
making "behind the scenes" when switching to designer and then to HTML view
again?

TIA, z.
Nov 18 '05 #1
1 1368
No, when editing in HTML view, you have to declare control manually in the
code behind file.

Thanks
Mikhail Arkhipov (MSFT)
-- This post is provided "AS IS" with no warranties, and confer no rights.

"z. f." <zi**@info-scopeREMSPAM.co .il> wrote in message
news:Ot******** ******@TK2MSFTN GP12.phx.gbl...
Hi,

adding a control with runat=server to an aspx page (using code - not
designer view) - don't cause the control to be added to the code behind (.cs ot .vb file)

only if i change the aspx view to designer and then to the HTML view again, the code behing is changed to add the controls with runat=server property.

is there a way using the IDE commands to run this command that the IDE is
making "behind the scenes" when switching to designer and then to HTML view again?

TIA, z.

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1513
by: Jay | last post by:
Where is there a good article/description on why everything is runat=server. I just can't seem to grasp why ALL tags (even table tags) are runat server in dotnet. Thank You
4
1889
by: Steve Bywaters | last post by:
(In my transition from ASP to ASP.NET) *When* would I use at "runat server" tag on a button, as opposed to a normal button? If I set up a search area on a page, with a 'Search' button that applies the entered items to the db - is that best as a normal button or server control.... and why? Steve
1
1231
by: feng | last post by:
I need to add an "onload" attribute to <body> tag so that I can insert client side JavaScript when the page is reloaded. It looks like I should be able to get a reference to the <body> control as it takes a "runat=server" attribute. But I still don't know how to define this body control in code behind. Can someone show me how to do this? ...
3
3766
by: Ferryandi | last post by:
hi, i have created a button link like this and attach it to placeholder in code behind linkbutton1 = New LinkButton linkbutton1.Text = "Link Button linkbutton1.ID = "Link1" PlaceHolderLink.Controls.Add(linkbutton1) but how do i add runat="server" as in html code in code behind, im using vb.net
4
13312
by: Alex Maghen | last post by:
I have a master page which contains a general page framework and also contains a <form runat=server> around most of the content of the page. Inside that <form> tag is a ContentPlaceholder. I then create an ASPX which is tied to that MasterPage and in it a put a bunch of form fields and an <asp:Button />. When I try to run the page, I get......
7
6273
by: Alex Maghen | last post by:
I have some client-side JavaScript that I want to run whenever a pulldown <SELECT> is changes on th client. I'm trying to do this as follows... <select id="MyPulldown" onchange="handleProblemChange();" runat="server"> If I do this, I get client-side javascript errors because the id "MyPulldown" doesn't exist. It's been mangled into this...
4
13352
by: Erland | last post by:
Hello everyone, I am have couple of bad concepts and would like to clear things up. As I understand ASP.NET server controls contain runat=server tag and they only run on the server. But I've just seen an example where javascript can access server side controls. Now javascript is about all things CLIENT, so how can I access server controls...
4
14993
by: John Dalberg | last post by:
I am looking at a problem which is preventing my code to get a reference to any asp control inside a div section which has a runat=server attribute. This can be reproduced in a simple test: Create a blank webform and add this html inside the <formsection: <div id="myDiv" runat=server> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>...
2
4277
by: André | last post by:
Hi, i get sometimes an very unexpected error: "A form tag with runat=server must exist on the Page to use SetFocus() or the Focus property" at line: If j = 1 Then txta(i).Focus() There is a form tag as you can see in the aspx file. Is there any other reason for this error? Thanks for help
0
7416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7676
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7932
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7442
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5347
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4965
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3456
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1905
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.