I have compiled some shared function in a lybrary, which I use in
various application from asp pages, web services to winforms and
windows services.
some of the functionality in my libarary is dependent on where it is
called from. I would like to do one things if it is called from asp
application, and other if it is called from WinForms app.
Is there a way, I can distinguish where me library functions are called
from? 7 1185
Nikolay,
Just as idea, create your sub news like that and pass the form or whatever
Sub New (byval MyForm as Windows.Forms.F orm)
'for windows forms
Sub New (byval myPage as System.Web.Ui.P age)
'for webforms
Sub New
'for others
I hope this helps,
Cor
"Nikolay Petrov" <jo******@mail. bg> schreef in bericht
news:11******** *************@o 13g2000cwo.goog legroups.com... I have compiled some shared function in a lybrary, which I use in various application from asp pages, web services to winforms and windows services.
some of the functionality in my libarary is dependent on where it is called from. I would like to do one things if it is called from asp application, and other if it is called from WinForms app.
Is there a way, I can distinguish where me library functions are called from?
too much of overhead
i have hundreds of subs/functions, classes and so on
isn't there a way to know where a procedure is called from, an asp or
winforms?
How about testing for the presence of HTTPContext? If there's no HTTP
Context, chances are pretty good it's a WinForm app. You could set this to
a property to easily retrieve it in your solution.
"Nikolay Petrov" <jo******@mail. bg> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com... I have compiled some shared function in a lybrary, which I use in various application from asp pages, web services to winforms and windows services.
some of the functionality in my libarary is dependent on where it is called from. I would like to do one things if it is called from asp application, and other if it is called from WinForms app.
Is there a way, I can distinguish where me library functions are called from?
"Nikolay Petrov" <jo******@mail. bg> schrieb: I have compiled some shared function in a lybrary, which I use in various application from asp pages, web services to winforms and windows services.
some of the functionality in my libarary is dependent on where it is called from. I would like to do one things if it is called from asp application, and other if it is called from WinForms app.
Is there a way, I can distinguish where me library functions are called from?
I have never tested it, but I am curious what 'Assembly.GetEn tryAssembly'
returns for ASP.NET applications.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
"Nikolay Petrov" <jo******@mail. bg> schrieb: worth trying Herfried
For a simple ASP.NET page, 'GetEntryAssemb ly' returns nothing and
'GetCallingAsse mbly' returns "System.Web ...".
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Alan Partridge |
last post by:
I have an app with both a webforms and winforms front end.
When I change the web.config file, eventually IIS\ASP.NET
pick up the changes and all is well.
With the WinForms GUI - when I change the .config file, I
need a way to force the AppDomain to reload the new config
settings. This doesn't need to be automatic cause I can
control when the config file is updated.
Does anyone know how to force a reload of a new config
|
by: Jon Maz |
last post by:
Hi there,
I am experimenting with the FileSystemWatcher object. I have set the
NotifyFilter as follows:
myFileSystemWatcher.NotifyFilter = NotifyFilters.Security |
NotifyFilters.CreationTime |
NotifyFilters.LastWrite |
NotifyFilters.Size |
NotifyFilters.Attributes |
|
by: Elhanan |
last post by:
hi.. all
a client of ours is considering to move from a dos application to
windows desktop application.
the application is for traveling agency, the database is rather large.
their current database for other application is SQL-SERVER.
they have 12 users.
|
by: Segfahlt |
last post by:
I need a little help here please.
I have 2 win forms user controls in 2 different projects that I'm hosting in
2 different virtual directories. The controls have been test and operate okay
in both projects.
Both controls(dlls) have been signed using SN.exe and I've set up the
appropriate .Net assembly permissions using those Strong Names
The DLL's have been copied to the /bin directory in both web virtual
directories.
|
by: Pieter |
last post by:
Hi,
In my application VB.NET 2005 application I placed a ReportViewer, and link
it to a server-report:
Me.ReportViewer1.ProcessingMode =
Microsoft.Reporting.WinForms.ProcessingMode.Remote
Me.ReportViewer1.ServerReport.ReportPath =
"/myproject/DemandeDeCotation"
Me.ReportViewer1.ServerReport.ReportServerUrl = New
System.Uri("http://myserver/reportserver2005", System.UriKind.Absolute)
| |
by: 3Cooks |
last post by:
I have a windows application written in Visual Basic 6.0 that is going
to be redeveloped in dotNET. We are trying to decide if we should
deploy using Webforms or Winforms and I need advice from someone who is
not on my team.
The VB 6.0 application is used by approximately 100 users. All users
reside in-house. There is an existing external website that will use
some of the same components but the two applications are separate.
The...
|
by: netflex |
last post by:
Working on a handed off C# project and pretty much my third time dipping into
C#. In my solution file, I have a collection of .resx files in their own
folder, several .cs files, and my winforms .cs files. From what I understand
the .resx files house embedded resources, such as images and buttons texts.
When I open up my winforms however there is nothing there!
When I open up my winforms code behind, I see code such as:
this.$ = new...
|
by: brian.wilson4 |
last post by:
Our group is currently comparing winforms vs webforms.....app is Corp
LAN based - we have control of desktops.....Below is pros and cons list
we have come up with - if anything strikes you as untrue or you would
like to add - please comment - thanks.....
Rich Client PROS
1. User experience (* indicates feasible on web with AJAX) -
a. Single, unified application experience
b. Windows/Office-like look and feel -
i.Tabs - drag and drop...
|
by: raylopez99 |
last post by:
Here I am learning WinForms and two months into it I learn there's a
WPF API that is coming out. Is this WPF out yet, and is it a threat
to WinForms, in the sense that all the library routines I memorize and/
or familiarize myself in WinForms will disappear in WPF? I did note
in one early version of C#, the non-generic "ArrayList" was replaced
by the generic and template <based List, but that kind of change is
not a big deal. If WPF...
|
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 usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |