473,566 Members | 3,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling code-behind function from in-line code page

I have a fairly complex application written using a vb code-behind dll.
However, I'd like to write one particular aspx page utilising in-line code
so that it can easily be modified as needed by the end user, and yet still
utilise some functions in the code-behind dll.
Is this possible? (How?)

Nov 17 '05 #1
2 6900
Fred,

I'm not 100% positive but I don't think you can do this. To use the
codebehind file or inline code you change the page directive's
AutoEventWireup attribute. Since it has to be set to true or false I think
you can only use one or the other.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Fred Armitage" <No****@notanad dress.bin> wrote in message
news:bi******** ***********@new s.demon.co.uk.. .
I have a fairly complex application written using a vb code-behind dll.
However, I'd like to write one particular aspx page utilising in-line code
so that it can easily be modified as needed by the end user, and yet still
utilise some functions in the code-behind dll.
Is this possible? (How?)

Nov 17 '05 #2
I disagree. It is possible to use code behind and inline code at the same
time. Setting AutoEventWireup to true doesn't prevent events in the parent
class (in the code behind dll) from getting executed.
So you develop you code behind dll the normal way, and set AutoEventWireup
to true to handle page events (like Page_Init and Page_Load) in the aspx
file.

or better override the methods that raises these events, for example
<script language="c#" runat="Server">

protected override void OnLoad(EventArg s e)
{
// here execute the code you want to be executed before the Load event
is raised
base.OnLoad(e);
// here execute the code you want to be executed after the Load event is
raised
}
</script>

You can also decide not to call base.OnLoad if you don't want the Load event
to be fired. This gives more flexibility.
you can also use asp style inline code
for example
<table>
<%
for(int i = 0; i < 10; i++)
{
%>
<tr>
<td><%=i%></td>
<td>Hello World</td>
</tr>
<%
}
%>
</table>
"S. Justin Gengo" <sj*****@aboutf ortunate.com> wrote in message
news:#7******** ******@TK2MSFTN GP10.phx.gbl...
Fred,

I'm not 100% positive but I don't think you can do this. To use the
codebehind file or inline code you change the page directive's
AutoEventWireup attribute. Since it has to be set to true or false I think
you can only use one or the other.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Fred Armitage" <No****@notanad dress.bin> wrote in message
news:bi******** ***********@new s.demon.co.uk.. .
I have a fairly complex application written using a vb code-behind dll.
However, I'd like to write one particular aspx page utilising in-line code so that it can easily be modified as needed by the end user, and yet still utilise some functions in the code-behind dll.
Is this possible? (How?)


Nov 17 '05 #3

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

Similar topics

1
4067
by: Simon Holmes | last post by:
Hi, I am having trouble calling a UDF from a 'before update' trigger whereas I have no problems calling it from the 'after update' trigger. The trigger is as below : CREATE TRIGGER foo NO CASCADE
11
13549
by: JPRoot | last post by:
Hi I wish to set/get a property using System.ComponentModel.ISynchronizeInvoke.Invoke but I cannot find the exact syntax.. Any clue how to do this (right now I am making GetEnabled/SetEnabled methods when I wish to get/set Form.Enabled property. Thank JPRoo
5
1794
by: Shailendra Batham | last post by:
hi all I have a few web services, I want to find out when a particular web service is called........ is it possible in my web service to find the IP address or details of the computer who is calling my web service. Thanks, help is appreciated. shailendra batham
4
1671
by: ST | last post by:
From Form1 I call a public sub in a module. The sub writes on Form1. Problem: the call creates a new Form1 and writes on it, instead of writing on the one already shown Form1. I have tried to avoid this by entering the following code at the beginning of the sub: Module Module1
12
7064
by: Ron | last post by:
Greetings, I am trying to understand the rational for Raising Events instead of just calling a sub. Could someone explain the difference between the following 2 scenarios? Why would I want to raise an event instead of just calling the sub? Scenario1 -- Using Events ------------------------------------------------------ Public Class...
0
898
by: Louis Yeung | last post by:
Hi, Microsoft stated that ASP.NET calling web service, especially long delayed service, will have performance issue. I just need to confirm that web service hosted by ASP.NET/IIS calling another web service is also subject to the same performance issue. Is there any major difference between ASP.NET and Web Service running on IIS from a...
3
3565
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup and then do a refresh of the calling form. Any ideas on how to get a reference to the calling form? I tried window.parent.location.reload() , but...
7
2933
by: Lee Crabtree | last post by:
I remember when I was first getting into .NET Forms programming that there was a rather emphatic rule about not constructing a form before calling Application.Run with it. So this: Application.Run(new Form1()); was okay, but this: Form1 form = new Form1();
0
953
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
How can I activate a program that can retreive results to the calling control variables from the design mode property windows? I need to do somting like the SqlDataSource but to put the results inside the calling custom control.
3
5390
by: PaulR | last post by:
Hi, DB2 LUW 8.2 We would like to implement a trigger to stop an insert or "empty row" (under certain conditions), but not to throw an exception back to calling application i.e the calling application would be unaware that the insert had been stopped. Sounds a bit crazy perhaps, but is it possible?
0
7673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.