473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Server control on non-compiled .aspx page

Hi,

I have written a number of server controls to build the company's
intranet from data held in an Oracle database. Everything works well
for the various navigation pages.

However, the content pages are in the main converted .htm pages with no
code behind. The issue I have is that I wish to place a small
navigation server control on each page. All works well if I compile the
pages with the solution referencing the server control dll. However, I
don't want to create a project out of all the disparate pages as we
just wish to add and remove them without recourse to building a
solution - is this possible?

Nov 19 '05 #1
6 1837
You can make any changes to deployed aspx pages. As long as you don't change
(or in your case don't use) code-behind, asp.net will pick up changes on
next request and compile the page. You don't need to compile any project or
solution separately.

Eliyahu

"Gordo" <go***@ruthwell-ltd.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,

I have written a number of server controls to build the company's
intranet from data held in an Oracle database. Everything works well
for the various navigation pages.

However, the content pages are in the main converted .htm pages with no
code behind. The issue I have is that I wish to place a small
navigation server control on each page. All works well if I compile the
pages with the solution referencing the server control dll. However, I
don't want to create a project out of all the disparate pages as we
just wish to add and remove them without recourse to building a
solution - is this possible?

Nov 19 '05 #2
Eliyahu,

Thankyou for your quick response! I probably didn't explin things
fully. The issue I have is accessing the Server Control. If I place the
reference in the .aspx page like so,

<%@ Register TagPrefix="cc1" Namespace="WebControlLibrary"
Assembly="WebControlLibrary" %>

and then try to link to this page I get the error (this reference works
fine in compiled projects),

'File or assembly name bin\WebControlLibrary, or one of its
dependencies, was not found.'

I have tried placing the .dll files in the same folder, in a lower
subfolder as the .aspx pages and I have tried creating a web.config
file with the following in it,

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\WebControLibrary"/>
</assemblyBinding>
</runtime>

all to no avail.

I really do not want to compile all the pages into an application if I
can help it!

Any help would be greatly appreciated

Thanks

Gordon

Nov 19 '05 #3
Look into HTTPModules. You could intercept all of the requests for HTML
docs and modify the result prior to it being sent back to the browser
"Gordo" <go***@ruthwell-ltd.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi,

I have written a number of server controls to build the company's
intranet from data held in an Oracle database. Everything works well
for the various navigation pages.

However, the content pages are in the main converted .htm pages with no
code behind. The issue I have is that I wish to place a small
navigation server control on each page. All works well if I compile the
pages with the solution referencing the server control dll. However, I
don't want to create a project out of all the disparate pages as we
just wish to add and remove them without recourse to building a
solution - is this possible?

Nov 19 '05 #4
I'm having a very similar problem. I've been looking all over for the
answer. I know it just cannot be that complex!

In my case, I have a dependency on a library in the GAC (required for
shared use and support for multiple versions).

I tried adding the following to my web.config to no avail
-----------------------------------------------------------------------------------------------
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MyLibrary.Data"
publicKeyToken="af1d58a5db022a2c" culture="neutral"
version="1.0.4.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
-----------------------------------------------------------------------------------------------

If/When I get a response or figure out the answer, I'll send you my
results, in case it helps you out too.
-Jason Kendall
Ja**********@hotmail.com

On 1 Feb 2005 06:07:13 -0800, "Gordo" <go***@ruthwell-ltd.com> wrote:
Eliyahu,

Thankyou for your quick response! I probably didn't explin things
fully. The issue I have is accessing the Server Control. If I place the
reference in the .aspx page like so,

<%@ Register TagPrefix="cc1" Namespace="WebControlLibrary"
Assembly="WebControlLibrary" %>

and then try to link to this page I get the error (this reference works
fine in compiled projects),

'File or assembly name bin\WebControlLibrary, or one of its
dependencies, was not found.'

I have tried placing the .dll files in the same folder, in a lower
subfolder as the .aspx pages and I have tried creating a web.config
file with the following in it,

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="bin;bin\WebControLibrary"/>
</assemblyBinding>
</runtime>

all to no avail.

I really do not want to compile all the pages into an application if I
can help it!

Any help would be greatly appreciated

Thanks

Gordon


Nov 19 '05 #5
OK Got it!

My individual .aspx files (non compiled) have been held in a 'normal'
folder under wwwroot. Converting the folder into a virtual folder and
placing the required .dlls in a bin sub-folder did the trick!

Interestingly the <probing privatePath="bin;bin\WebControLibrary"/>
still failed if I placed the .dlls into the bin\WebControLibrary
sub-folder, but that is a minor irritant now.

Another (less favourable) option as it transpired was to place the
..dlls in the bin folder under wwwroot, that done I wouldn't need to
convert the 'normal' folder to a virtual folder.

Thanks for the input guys!

Nov 19 '05 #6
Unfortunately, this will not work for my situation because I have
multiple versions of my DLL in the GAC, from which I need to reference
it, and also because my app must participat in the same session as the
rest of the site, so converting the web folder to a web 'application'
would be bad.

Thanks for the information, though!
-Jason Kendall
Ja**********@hotmail.com
On 3 Feb 2005 09:57:23 -0800, "Gordo" <go***@ruthwell-ltd.com> wrote:
OK Got it!

My individual .aspx files (non compiled) have been held in a 'normal'
folder under wwwroot. Converting the folder into a virtual folder and
placing the required .dlls in a bin sub-folder did the trick!

Interestingly the <probing privatePath="bin;bin\WebControLibrary"/>
still failed if I placed the .dlls into the bin\WebControLibrary
sub-folder, but that is a minor irritant now.

Another (less favourable) option as it transpired was to place the
.dlls in the bin folder under wwwroot, that done I wouldn't need to
convert the 'normal' folder to a virtual folder.

Thanks for the input guys!


Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: simon place | last post by:
Spent some very frustrating hours recoding to find a way of closing a server socket, i'd not thought it would be any problem, however, after complete failure and as a last resort, i looked at the...
13
by: Jeager | last post by:
Why is it, Microsoft manage to write operating systems and office applications with every bell and whistle facility known to man. Yet, even after years and years of development they still cannot...
0
by: Chris Halcrow | last post by:
Hi I've spent ALL DAY trying to re-install SQL Server 2000 on Windows XP. I continually get the error 'cannot configure server' just at the end of the installation. I've tried the following: ...
0
by: Ravi | last post by:
i tried with MS treeview control but i am unable to implement all the requirements.This requiement like when user login will generate the menu and display it. After that we need to Add or remove...
3
by: Stan | last post by:
Hallo, I have developed an application in MS Access 2000 (Polish version) under MS Windows XP prof (also Polish). Now I would like to run this code on MS Windows XP EN and MS Access XP EN. I have...
2
by: Iyigun Cevik | last post by:
I have a server control which contains several LinkButtons like MyLink = new LinkButton(); MyLink.Text = "Cikar"; MyLink.Click += new EventHandler(this.MyLinkClicked); Controls.Add( CikarLink );...
2
by: Random | last post by:
Is there a simple way to get a RequiredFieldValidator to work with a non-server control? I have a hidden field that I cannot make into a server control because I have to change it's value with...
17
by: Danieltbt05 | last post by:
just installed SQL server 2000 and using my client , i can't locate the server. I used SQL query analyzer to search but no servers were found. Error message is as below Server : Msg17,level...
17
by: Alan Silver | last post by:
Hello, I have a page which I am converting to use themes. The page has an HTML <input type="image"> element that is used to post to another page. I would like to replace this with a server...
1
by: mcoyote | last post by:
So, the situation is that we have a poorly-executed UserControl that relies on a number of singletons in its assembly that unfortunately, over time, began acquiring the state of the control....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.