Compilation issue with ascx controls.


I have a bunch of ascx controls which I am loading at runtime.   Below is an example. 
        if (e.PageView.ID.StartsWith("Submissions"))
        {
            controls_SubmissionsList submissionsList = (controls_SubmissionsList)LoadControl("controls/submissionslist.ascx");
            submissionsList.InquiryId = Convert.ToInt32(e.PageView.ID.Remove(0, 11));
            e.PageView.Controls.Add(submissionsList);
        }

 Each time I edit anything in the App_Code directory and try and run it I get the error:
     Error 1 The type or namespace name 'controls_SubmissionsList' could not be found (are you missing a using directive or an assembly reference?) c:\SCID\SCID.Web\Default.aspx.cs 40 13 c:\SCID\SCID.Web\

To fix this I need to clean and rebuild the entire solution.  This is a really time consuming and annoying, really slowing my workflow.  Does anyone have any ideas on how to solve this???
 
 
 
 

Plz remember to click "Mark as Answer" if this helped you.
0
Ugly
5/5/2009 12:23:38 AM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 6 followers.

💬 3 Replies
👁️‍🗨️ 2742 Views



 Hi,
http://forums.asp.net/t/409978.aspx
Chck the above Descison It shows who To ad user control dynaically.....
What is "controls_SubmissionsList" ??

Thanks
Avinash Tiwari

Remember to click “Mark as Answer” on the post, if it helps you.
-1
qwe123kids
5/5/2009 5:18:01 AM

 
<%@ Assembly src="src/MySource.vb" %>
http://msdn.microsoft.com/en-us/library/a7c375wt(VS.71).aspx

We All move to our original place.
Don't forget.

Imran Baloch
1
imran_ku07
5/5/2009 5:19:11 AM

Is controls_SubmissionsList the name of the class?
Can you try to drag n drop the control on the page and see if that works. 

Bind GridView to Dynamically created DataTable | Bind DataTable to DropDownList

My Blog
-1
shahed
5/5/2009 6:36:32 AM
Reply: