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

Access a Class properties/methods from a .aspx file ?????

Hi
I have written a class (Vb.net) which supposed to write out page title, img
URLs and other stuff.

I can access the class methods and properties easily through the .vb page
But how do I change the things on the .aspx file via the class eg

--------------- .vb file --------------

Dim pageTitle as string = ""
Dim objSiteStyle As New SStyle()
objSiteStyle.NewStyle()
pageTitle = objSiteStyle.pageTitle
objSiteStyle.Nothing
--------------- .aspx file --------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>[WRITE OUT THIS VIA THE CALSS pageTitle ]</title>
'<<<<<<<<<<<<<HELP
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
</form>
</body>
</HTML>

Nov 17 '05 #1
1 2575
sky
Thanx mate

vQuick reply
That took me ages to work out

"abacnet" <ab*****@hotmail.com> wrote in message
news:uk*************@TK2MSFTNGP10.phx.gbl...
1-First of all your class must be accessible in the code behind of the ..aspx page
2-Use a page level protected variable in your code behind .vb page
(protected mstrTitle as string="")
3-In the page load, or anywhere that you find suited for your case, add
.....your working vb code and don't forget to assign value to the title
string
mstrTitle = objSiteStyle.pageTitle
4-In the HTML part of your .aspx page do inherit the string
<title><%=mstrTitle%></title>
<sk****@system-gone-soft.com> wrote in message
news:hB*******************@newsfep2-win.server.ntli.net...
Hi
I have written a class (Vb.net) which supposed to write out page title,

img
URLs and other stuff.

I can access the class methods and properties easily through the .vb page But how do I change the things on the .aspx file via the class eg

--------------- .vb file --------------

Dim pageTitle as string = ""
Dim objSiteStyle As New SStyle()
objSiteStyle.NewStyle()
pageTitle = objSiteStyle.pageTitle
objSiteStyle.Nothing
--------------- .aspx file --------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>[WRITE OUT THIS VIA THE CALSS pageTitle ]</title>
'<<<<<<<<<<<<<HELP
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
</form>
</body>
</HTML>



Nov 17 '05 #2

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

Similar topics

5
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
by: William Parker | last post by:
I have a web control I made called header.ascx. It has its own properties and methods I defined. But I cannot figure out how to access this control from my code behind page. I can create the...
5
by: djscratchnsniffing | last post by:
i know you can access an ascx's properties/methods from an aspx file. Let's say you have an aspx file with two code-behind files(ascx files). Can you access one of the ascx file's...
3
by: Mick | last post by:
Hi, Dragging & Dropping my ascx control in my aspx page, I just wanna know how I can access its properties when validating the form ? The control is composed of 4 controls (2 txtbox and 2 dropdown...
5
by: Lyle Fairfield | last post by:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp The Joy of Interoperability Sometimes a revolution in programming forces you to abandon all...
17
by: Mell via AccessMonster.com | last post by:
Is there a way to find out where an application was created from? i.e. - work or home i.e. - if application sits on a (work) server/network, the IT people know the application is sitting...
7
by: Andy B | last post by:
I have a class I am creating for data access. I need to access controls from inside the class that are on a particular page. How do I do this? or is creating an instance of the page class and using...
0
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,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.