473,383 Members | 1,863 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,383 software developers and data experts.

Defining methods outside of script tags

Is it possible to define methods outside of
<script runat=""> tags under ASP.Net?

With the old ASP one used to be able to create
VB methods which contained inlined document data,
for example:

<%

LoadElementNode()

Function LoadElementNode

%>

<element>
<data><% =somedata() %></data>
</element>

<%

End Function

%>
However, with ASP.Net, all the inlined code and data
seems to be converted into code within the body
of a generated method such as:

Private Sub __Render__control1
# generated code here...
End Sub

So that the LoadElementNode function above generates
a compilation error. Is there a comparable alternative
in ASP.Net?
Nov 18 '05 #1
3 855
Nope.

Karl

"Jasper Pearlman" <no****@mailinator.com> wrote in message
news:e%***************@TK2MSFTNGP12.phx.gbl...
Is it possible to define methods outside of
<script runat=""> tags under ASP.Net?

With the old ASP one used to be able to create
VB methods which contained inlined document data,
for example:

<%

LoadElementNode()

Function LoadElementNode

%>

<element>
<data><% =somedata() %></data>
</element>

<%

End Function

%>
However, with ASP.Net, all the inlined code and data
seems to be converted into code within the body
of a generated method such as:

Private Sub __Render__control1
# generated code here...
End Sub

So that the LoadElementNode function above generates
a compilation error. Is there a comparable alternative
in ASP.Net?

Nov 18 '05 #2
Damn!

"Karl" <none> wrote in message news:eQ*************@TK2MSFTNGP11.phx.gbl...
Nope.

Karl

"Jasper Pearlman" <no****@mailinator.com> wrote in message
news:e%***************@TK2MSFTNGP12.phx.gbl...
Is it possible to define methods outside of
<script runat=""> tags under ASP.Net?

With the old ASP one used to be able to create
VB methods which contained inlined document data,
for example:

<%

LoadElementNode()

Function LoadElementNode

%>

<element>
<data><% =somedata() %></data>
</element>

<%

End Function

%>
However, with ASP.Net, all the inlined code and data
seems to be converted into code within the body
of a generated method such as:

Private Sub __Render__control1
# generated code here...
End Sub

So that the LoadElementNode function above generates
a compilation error. Is there a comparable alternative
in ASP.Net?


Nov 18 '05 #3
There's probably no good reason to want to...if you have a specific problem
I'll be more than happy to try to help if you explain it.
"Jasper Pearlman" <no****@mailinator.com> wrote in message
news:u3**************@TK2MSFTNGP10.phx.gbl...
Damn!

"Karl" <none> wrote in message

news:eQ*************@TK2MSFTNGP11.phx.gbl...
Nope.

Karl

"Jasper Pearlman" <no****@mailinator.com> wrote in message
news:e%***************@TK2MSFTNGP12.phx.gbl...
Is it possible to define methods outside of
<script runat=""> tags under ASP.Net?

With the old ASP one used to be able to create
VB methods which contained inlined document data,
for example:

<%

LoadElementNode()

Function LoadElementNode

%>

<element>
<data><% =somedata() %></data>
</element>

<%

End Function

%>
However, with ASP.Net, all the inlined code and data
seems to be converted into code within the body
of a generated method such as:

Private Sub __Render__control1
# generated code here...
End Sub

So that the LoadElementNode function above generates
a compilation error. Is there a comparable alternative
in ASP.Net?



Nov 18 '05 #4

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

Similar topics

7
by: Harry Pehkonen | last post by:
I have been defining new class methods when I'm trying to simplify some code. But I'm thinking I should just define functions within that method because they aren't useful from the outside anyway....
99
by: David MacQuigg | last post by:
I'm not getting any feedback on the most important benefit in my proposed "Ideas for Python 3" thread - the unification of methods and functions. Perhaps it was buried among too many other less...
11
by: Steven D'Aprano | last post by:
Suppose I create a class with some methods: py> class C: .... def spam(self, x): .... print "spam " * x .... def ham(self, x): .... print "ham * %s" % x .......
11
by: julien | last post by:
Hello, I posted this question on the NDoc-user mailing list, but it looks like a dead list (no messages for 10 days!). I'd like to use NDoc tags or custom tags inside methods like: void...
2
by: taras.di | last post by:
Hi everyone, Is it possible to place javascript outside of <html> tags? I'm trying it on mozilla atm, and it seems to be working, but I was more worried about the older browsers. Cheers ...
6
by: Phil Latio | last post by:
I am missing a trick here on how use variables defined in seperate file. In script 1, I have proved to myself my class is working OK because I can pass in the values and the echo statement...
4
by: Mark G. | last post by:
Hello. I am attempting to write a "scraper" to download information from a commercial web site. Oddly enough, they don't want to make this easy for me! Their pages include plenty of Javascript,...
4
by: Hans | last post by:
Hi, I want to define a couple of constant strings, like in C: #define mystring "This is my string" or using a const char construction. Is this really not possible in Python? Hans
26
by: Cliff Williams | last post by:
Can someone explain the pros/cons of these different ways of creating a class? // 1 function myclass() { this.foo1 = function() {...} } // 2a
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
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...
0
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.