Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

New page controls added are not visible in code-behind form some reason...

Posted on 2010-11-13
7
Medium Priority
?
631 Views
Last Modified: 2012-08-13
For some reason, all of a sudden any control I add to the HTML side with the "SERVER" identification doesn't show up in the code behind... I am not sure what happened since the controls that exist already show up just fine but anything new i add does not... I.E. i add a variable like:
<asp:DropDownList runat="server" id="ddlNewElement">
but on the c# side, ddlNewElement is not a valid element?
0
Comment
Question by:dxproz232
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 5

Expert Comment

by:roxviper
ID: 34127477
do you have a web project or a website?
0
 
LVL 6

Expert Comment

by:AlfredRobot
ID: 34127483
I have this question before, very strange. Basically, that time i delete all the "unidentified control" from aspx page, and restart the vs2010. Then I drag the controls I want to add from toolbox to the aspx page, then it suddenly works. I don't know the reason, hope this will help.
Good luck.
0
 
LVL 16

Expert Comment

by:BurnieP
ID: 34127564
Make sure that you didn't break your HTML tags.  A malformed HTML tag can be the reason VS is not able to recognize any new controls you add.   I had your problem several times and each time it was because I had an <asp: ...  without the end </asp:...

I would check that first.

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 12

Accepted Solution

by:
jagssidurala earned 2000 total points
ID: 34128301
I think you are using VS 2008. if we used this make sure that the control should also present in .designer.cs file. if do not find this in designer.cs we get the error which you mentioned.

to avoid this problem
Cut the control in .aspx and save the file then paste the same. it should work as per my knowlegde.........
0
 

Author Closing Comment

by:dxproz232
ID: 34129388
Thanks everyone but nothing worked until I went into the code-behind and manually added the entry into the designer.cs file. I don't drag elements (I write the HTML manually) so that maybe why it happens to me more then usual? Anyway thanks for the solution...
0
 
LVL 16

Expert Comment

by:BurnieP
ID: 34129422
You should never have to directly modify the designer.cs file.

I am curious to see your .aspx file.  I might be able to find what tag is missing.

Now, you are putting yourself into a corner because you will have to modify the designer.cs file for every control you add in your page.  Normally, everytime you save your page it is silently modifying your designer.cs file with control it sees on it.  Your problem is it doesn't save your controls in the designer.cs file because it is not recognizing your new controls, because of a malformed tag.

I am even curious to see, if you save back your .aspx file if it will remove your modification to the designer.cs file.

That is not the way to go, sorry.  I don't want people google-ing and find that solution as a valuable solution, because it is not.
0
 

Author Comment

by:dxproz232
ID: 34130553
Well the funny thing is once i added the missing entry in the designer.cs file, anything i added after that worked properly...
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question