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

best way to have global, application level objects

I would like to create an instance of Windows Media Player that I can
manipulate from within ASP.NET pages. Do I just create an instance of
Windows Media Player from within the Application_OnStart event in
global.asax? If so, how do I reference this object in a page event?

Is this a dumb way to do it? Any help is appreciated.
Nov 18 '05 #1
6 1538
You can store the object in the Application object in the Application_Start event. Then, in you pages, you can refer to this object by retrieving it from the Application object

MyClass obj = (MyClass)Application["WMP"]

Tu-Thac
www.ongtech.co

----- Craig Traxler wrote: ----

I would like to create an instance of Windows Media Player that I ca
manipulate from within ASP.NET pages. Do I just create an instance o
Windows Media Player from within the Application_OnStart event i
global.asax? If so, how do I reference this object in a page event

Is this a dumb way to do it? Any help is appreciated

Nov 18 '05 #2
Hi Craig,

Why on earth do you want to store an instance of Windows Media Player
(client) on your server? It won't help your browser clients.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Craig Traxler" <cr***********@comcast.net> wrote in message
news:kL*****************@newssvr26.news.prodigy.co m...
I would like to create an instance of Windows Media Player that I can
manipulate from within ASP.NET pages. Do I just create an instance of
Windows Media Player from within the Application_OnStart event in
global.asax? If so, how do I reference this object in a page event?

Is this a dumb way to do it? Any help is appreciated.

Nov 18 '05 #3
Because I can think of no other way to control what is played on a pc from a
remote browser.
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:eJ***************@TK2MSFTNGP11.phx.gbl...
Hi Craig,

Why on earth do you want to store an instance of Windows Media Player
(client) on your server? It won't help your browser clients.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Craig Traxler" <cr***********@comcast.net> wrote in message
news:kL*****************@newssvr26.news.prodigy.co m...
I would like to create an instance of Windows Media Player that I can
manipulate from within ASP.NET pages. Do I just create an instance of
Windows Media Player from within the Application_OnStart event in
global.asax? If so, how do I reference this object in a page event?

Is this a dumb way to do it? Any help is appreciated.


Nov 18 '05 #4
Thanks. I will try to figure out how to do the cast in VB.

"Tu-Thach" <an*******@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
You can store the object in the Application object in the Application_Start event. Then, in you pages, you can refer to this object
by retrieving it from the Application object:
MyClass obj = (MyClass)Application["WMP"];

Tu-Thach
www.ongtech.com

----- Craig Traxler wrote: -----

I would like to create an instance of Windows Media Player that I can
manipulate from within ASP.NET pages. Do I just create an instance of Windows Media Player from within the Application_OnStart event in
global.asax? If so, how do I reference this object in a page event?

Is this a dumb way to do it? Any help is appreciated.

Nov 18 '05 #5
Well, Craig, you haven't thought of one yet. Windows Media Player (client)
on your server is about as useful as Internet Explorer (client) on your
server. Your clients will never see it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Craig Traxler" <cr***********@comcast.net> wrote in message
news:mR****************@newssvr26.news.prodigy.com ...
Because I can think of no other way to control what is played on a pc from a remote browser.
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:eJ***************@TK2MSFTNGP11.phx.gbl...
Hi Craig,

Why on earth do you want to store an instance of Windows Media Player
(client) on your server? It won't help your browser clients.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Craig Traxler" <cr***********@comcast.net> wrote in message
news:kL*****************@newssvr26.news.prodigy.co m...
I would like to create an instance of Windows Media Player that I can
manipulate from within ASP.NET pages. Do I just create an instance of
Windows Media Player from within the Application_OnStart event in
global.asax? If so, how do I reference this object in a page event?

Is this a dumb way to do it? Any help is appreciated.



Nov 18 '05 #6
Thank you for your interest. I do not want to play the media on the client.
I want to play it on the "server."
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:uY****************@TK2MSFTNGP10.phx.gbl...
Well, Craig, you haven't thought of one yet. Windows Media Player (client)
on your server is about as useful as Internet Explorer (client) on your
server. Your clients will never see it.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Craig Traxler" <cr***********@comcast.net> wrote in message
news:mR****************@newssvr26.news.prodigy.com ...
Because I can think of no other way to control what is played on a pc
from a
remote browser.
"Kevin Spencer" <ke***@takempis.com> wrote in message
news:eJ***************@TK2MSFTNGP11.phx.gbl...
Hi Craig,

Why on earth do you want to store an instance of Windows Media Player
(client) on your server? It won't help your browser clients.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Craig Traxler" <cr***********@comcast.net> wrote in message
news:kL*****************@newssvr26.news.prodigy.co m...
> I would like to create an instance of Windows Media Player that I can > manipulate from within ASP.NET pages. Do I just create an instance of > Windows Media Player from within the Application_OnStart event in
> global.asax? If so, how do I reference this object in a page event?
>
> Is this a dumb way to do it? Any help is appreciated.
>
>



Nov 18 '05 #7

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

Similar topics

0
by: Evan Freeman[C++ Samuri] | last post by:
Ok I have recently run into an issue in our production environment, and am looking for solutions to error handling. Inside the Global.asa file I use the object tags to create an application...
3
by: Steve | last post by:
Visual Studio 2003 / C# My application has 1 main form. On this form is a treeview object down the left hand edge and a status bar along the bottom. That is all. The tree view acts as my menu...
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
3
by: Joe Reazor | last post by:
I understand how Web.Config inheritance works between a parent application and sub applications under the parent. But what I was wondering was if there was a similar way to do the same thing for...
15
by: randyr | last post by:
I am developing an asp.net app based on a previous asp application. in the asp applications global.asa file I had several <object id="id" runat="server" scope="scope" class="comclass"> tags for...
8
by: Vishwanathan Raman | last post by:
Hi I have a declared a static DataSet object SOBJ in Global.asax.I also have a localy defined DataSet LSOBJ in Global.asax which I am storing in Application State.Is there any technical...
20
by: Keith G. Murphy | last post by:
I'm trying to get a feel for what most people are doing or consider best practice. Given a mod_perl application talking to a PostgreSQL database on the same host, where different users are...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
23
by: David Colliver | last post by:
Hi, using c#, 1.1 I know that we are not supposed to use global variables etc. in c# I am having a problem, but not sure how to resolve. I did have another post here, but may have over...
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: 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: 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$) { } ...
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...
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:
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.