In Solution, In Web project Test.aspx file, How can i refer to dll on
page directives. WebDll project(same solution) I dont want to use
codebehind pages such as (test.aspx.cs)
WebProject
Test.aspx
bin
WebProject.dll
WebDll.dll
Webdll
Test.cs
allreay copied webdll to app bin dir.
and ref it.
Anyone can help me out with systax here. or this is a dream
I have tried last couple hours and no luck.
<%@ Page Language="c#" AutoEventWireup="false"
Inherits="WebDll.Test" Src="test.cs"%>
<%@Page Language="c#" AutoEventWireup="false" Inherits="Test"
Src="Test.cs"%>
They all give errors.
could not find or could not load errors
any idea 7 1984
Hi Matt,
Try @ Assembly
"Links an assembly to the current page during compilation, making all the
assembly's classes and interfaces available for use on the page."
<%@ Assembly Name="assemblyname" %>
Name - A string that represents the name of the assembly to link to the
page.
Note The assembly name does not include a file name extension. http://msdn.microsoft.com/library/en...asp?frame=true
"Matt" <me*******@Hotmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... In Solution, In Web project Test.aspx file, How can i refer to dll on page directives. WebDll project(same solution) I dont want to use codebehind pages such as (test.aspx.cs) WebProject Test.aspx bin WebProject.dll WebDll.dll Webdll Test.cs
allreay copied webdll to app bin dir. and ref it. Anyone can help me out with systax here. or this is a dream I have tried last couple hours and no luck.
<%@ Page Language="c#" AutoEventWireup="false" Inherits="WebDll.Test" Src="test.cs"%> <%@Page Language="c#" AutoEventWireup="false" Inherits="Test" Src="Test.cs"%>
They all give errors. could not find or could not load errors any idea
Hi Ken
<%@ Assembly Name="WebDll" %>
I have been dealing with this last 4 hours. There is gotta be solution.
When i put this line on top of my page, Page shows on browser Ok. This
time When i click on the buttons actions from that dll not triggered.
any idea?
Maybe you need to show us some source code?
"Matt" <me*******@Hotmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com... Hi Ken <%@ Assembly Name="WebDll" %> I have been dealing with this last 4 hours. There is gotta be solution. When i put this line on top of my page, Page shows on browser Ok. This time When i click on the buttons actions from that dll not triggered. any idea?
Test.aspx page
<%@ Assembly Name="WebDll " %>
<%@ Page Language="c#" AutoEventWireup="false" Inherits="Test"%>
<asp:Label runat="server" id="message">Click a button!</asp:Label>
<asp:Button runat="server" id="button1" Text="One" />
Test.cs on WebDll project
public class Test : Page
{
protected Button button1;
protected Label message;
protected void Page_Init(Object sender, EventArgs e)
{
EventHandler clickHandler = new EventHandler(ButtonClick);
button1.Click += clickHandler;
}
public void ButtonClick(Object sender, EventArgs e)
{
if (sender is Button)
{
Button clickedButton = (Button)sender;
message.Text = "You clicked: " + clickedButton.Text;
}
}
}
I have one solution with two project
WebProject // App project
Test.aspx
bin // i have copied the WebDll to Application project and refer
to it
WebProject.dll
WebDll.dll
Webdll // Dll project
Test.cs
when i click on the button aspx page I like to trigger the click event
on webDll.Test.cs which i have referance it
Thanks Ken
I got it
It works fine now with the Assembly Name Inherits using together.
4 $ hours mate.
CHeers
Good.
Maybe you'll make back the 4 hours on the next problem. <grin>
"Matt" <me*******@Hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com... Thanks Ken I got it It works fine now with the Assembly Name Inherits using together.
4 $ hours mate. CHeers
Matt wrote: In Solution, In Web project Test.aspx file, How can i refer to dll on page directives. WebDll project(same solution) I dont want to use codebehind pages such as (test.aspx.cs) WebProject Test.aspx bin WebProject.dll WebDll.dll Webdll Test.cs
allreay copied webdll to app bin dir. and ref it. Anyone can help me out with systax here. or this is a dream I have tried last couple hours and no luck.
Matt,
( I am a newbie, so trust but verify what I have to say. )
As long as the classes you want to use are in an assembly .dll in the
/bin directory of your application ( in IIS admin you have to make the
directory an application directory ), you can reference them simply
with an @import directive in your .aspx file. You dont need the the
@assembly directive.
If you place the .dll into the GAC, you can use @assembly to get at
your assembly. In that case you have to specify the public key and
whatever on the @assembly stmt. ( but, newbie opinion follows, using
the GAC is not a good idea if you ever plan on deploying your
application to a shared hosting site. You might not have access to the
GAC on a shared hoster. )
-Steve <%@ Page Language="c#" AutoEventWireup="false" Inherits="WebDll.Test" Src="test.cs"%> <%@Page Language="c#" AutoEventWireup="false" Inherits="Test" Src="Test.cs"%>
They all give errors. could not find or could not load errors any idea This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Erik Lindeblom |
last post by:
I am having trouble getting ANY asp.net application (either .aspx or .asmx)
working when IIS is configured to use a "share located on another computer"
via a UNC reference. Any .aspx or .asmx...
|
by: Alex Maghen |
last post by:
Hi. I really like to develop most of my stuff without havig a Visual Studio
WebForms project. In other words, I largely develop "loose" .ASPX and .CS
files that dynamically compile when...
|
by: jakk |
last post by:
hello all,
whats the Difference between bin and obj directories and difference
between project references and dll references?
thanks
jack
|
by: Praveen Ramesh |
last post by:
Hi,
Is there any way to add the @Assembly reference to the aspx files
programmatically from inside a custom control (when it gets dropped on to
the page from the toolbox)?
I have a custom...
|
by: mndang |
last post by:
Hi All,
This may have been posted before and such, but I tried a few solutions
on the web but to no avail.
Problem: I have a web projects (not Web Application Project) with many
project...
|
by: DonJefe |
last post by:
Does anyone have experience using project->project references in large
solutions? What are the plus/minuses that you have found?
Currently, we are using the binary assembly references for our...
|
by: Fabian von Romberg |
last post by:
Hi,
I have a small project that is compiled into one single assembly and
obfuscated with Dotfuscator. When I test it I get error due to references
problems (invalid namespaces, function names,...
|
by: chris fellows |
last post by:
Can someone tell me if .NET 2.0 framework has a namespace to enable project
references to be changed programmatically? My C# project files are stored in
source control with DLL references but I...
|
by: Lance Wynn |
last post by:
Hello,
I am receiving this error when trying to instantiate a webservice component.
I have 2 development machines, both are XP sp2 with VS 2008 installed. On
one machine, the code works fine. On...
|
by: David Thielen |
last post by:
Hi;
When we add a reference to a web app, where is that information
stored? There is no project file, it's not in the web.config or
solution file.
??? - thanks - dave
...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |