Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 13, 2009 08:56 AM by TheRed
Apr 24, 2009 01:16 AM|LINK
i have find a sample to create a Drag and Drop gridview, and success when i was using DLL file. The sample have the source file, DragDropGridView.cs, how can i reference the cs file instaed of the DLL file in a XXX.aspx and XXX.aspx.cs? and where should
I place the code file?
Apr 24, 2009 03:19 AM|LINK
The files .cs or .vb should be placed in the App_Code folder of your website. If they are associated to a web control (aspx or ascx) then just add the files to your project as you normally would.
Apr 24, 2009 03:26 AM|LINK
i place this code when i reference a DLL file, how can i reference when i use the code file?
<%@ Register Assembly="Utility" Namespace="Utility" TagPrefix="cc1" %>
May 13, 2009 08:04 AM|LINK
I have the same problem of ricky, anyone has a solution?
In my case, i use the DLL and the code
I remove the .dll and placed the source code inside the App_code folder. The source code compiles ok, but the build gives this two kind of errors:
Error 1 Could not load file or assembly 'DayPilot' or one of its dependencies. Impossibile trovare il file specificato. c:\inetpub\wwwroot\DayPilotLiteDemo\NonBusinessHours.aspx 2
for the <%@Register tag (ok this sound pretty obvious, since now there isn't the dll)
Error 50 Unknown server tag 'daypilot:daypilotcalendar'. c:\inetpub\wwwroot\DayPilotLiteDemo\ShowHours.aspx 10
So i have tried to delete the <% Register Assembly= tag and insert an <% Import Namespace= tag
and the to use some combination of tags to use the component but without
The source code have this directory structure:
App_Code -> Web -> Ui -> DayPilotCalendar.cs
Any help would be very appreciated
May 13, 2009 08:56 AM|LINK
I have found the solution to use the source code instead of the dll, and it is really really simple, [:O]
I post it for the convenience of all. Put the source code in the App_Code directory (create it if it doesn't exist).
The in the line when you reference the dll:
Simply remove the Assembly= property and it works!!!
Explanation: the Assembly= searches for the compiled dll, so of course it doesn't work.
However you need the <% Register directive and not simply the <% Import, because you don't have to only import the namespace but also to use the control inside the aspx page.
So now my code is like this:
In your code, of course, you must replace the
DayPilot.Web.Ui with the correct namespace used by your classes