Click here to Skip to main content
15,913,685 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
iam working on vs 2005
i have added a control radiobutton with id name with runat server
but it shows error

rdbtn does not exist in current context
Posted
Comments
Tom Marvolo Riddle 28-Jan-14 1:58am    
post your tag

First try to Clean and Rebuild the Solution.

If problem still exists go the designer.cs of the Page and check whether the RadioButton exists there. You can even try to remove the particular designer code file and generate it once again by Right click on the WebPage file from the SolutionExplorer, choose "Convert to WebApplication". Then Rebuild.
 
Share this answer
 
Comments
utm 28-Jan-14 2:43am    
in vs2005 i have not get designer.cs.. kindly explain
The error is clear enough:
ASP.NET
<asp:radiobuttonlist id="RadioCoupon" runat="server" cssclass="nobg" repeatdirection="Horizontal" xmlns:asp="#unknown"></asp:radiobuttonlist>


Change the ID RadioCoupon to rdbtn .
 
Share this answer
 
Comments
utm 28-Jan-14 3:45am    
no i maintain the same name in aspx page as well as .cs page and rbtn i given the example that is not the issue.
Tom Marvolo Riddle 28-Jan-14 4:01am    
Then please post the .aspx as well as .cs code.It will be easy for us to find what's wrong in it
Clean up the solution then build again.otherwise post you .cs part too.
 
Share this answer
 
many Thanks for reply
i have got the solution
in my case i have two aspx pages having same Inherits=xyz now when i add control in one aspx page another gives error in code behind."RadioCoupon does not exist in current context "so i have added same control in another aspx. it may be excluded from project , its according to the requirement.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900