This probably is a very noob question
What is the return type of Session("Someth ing")?
I want to change:
If Not Session("Name") Is Nothing Then
LoginId = Session("Name") .ToString
to something like
MyObject = Session("Name")
If Not MyObject Is Nothing Then
LoginId = MyObject.ToStri ng 4 1569
Object
<ma*********@ho tmail.comwrote in message
news:11******** **************@ t46g2000cwa.goo glegroups.com.. .
This probably is a very noob question
What is the return type of Session("Someth ing")?
I want to change:
If Not Session("Name") Is Nothing Then
LoginId = Session("Name") .ToString
to something like
MyObject = Session("Name")
If Not MyObject Is Nothing Then
LoginId = MyObject.ToStri ng
Stephany Young schreef:
Object
Works, including the ToString call, which would be a polymorphic call
from a general reference I presume? Or is the Object type really a
Session Object type and not a general root for all Objects in VB, and
not like Object in Java?
Thanks a lot!
Every type is derived from type Object.
Object exposes a ToString() method therefore every type exposes a ToString()
method.
You can cast the returned object as type session:
Dim mySession As Session = CType(returnedO bject, Session)
<ma*********@ho tmail.comwrote in message
news:11******** **************@ l12g2000cwl.goo glegroups.com.. .
>
Stephany Young schreef:
>Object
Works, including the ToString call, which would be a polymorphic call
from a general reference I presume? Or is the Object type really a
Session Object type and not a general root for all Objects in VB, and
not like Object in Java?
Thanks a lot!
Stephany Young schreef:
Every type is derived from type Object.
Hey, just to confirm, this is then a .NET property I think, not in VB
but in C# also, all objects are derived from type Object. Is that
correct?
As you might suggest, I am fairly new to .NET.
And thanks again, learned another little piece of .NET today. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sam Sungshik Kong |
last post by:
Hello!
I use Python for ASP programming.
I found something weird.
Response.Write(Request("something"))
It draws "None" when there's no value for something.
Actually I expect "" instead of "None".
So I changed it like
|
by: gambler |
last post by:
let's say you have:
var games = new Array();
games = new GAME(gameNum, rotNum1, rotNum2, ... );
(
so a sparsley populate array which enables me to locate a game usin
the game number without having to implement a "search" function on th
games array
|
by: juglesh |
last post by:
"$string = isset($xyz) ? $xyz : "something else";"
Hello, someone gave code like this in another thread. I understand (by
inference) what it does, but have not found any documentation on this
type of syntax.
Any one have links to this shortuct(?) syntax and other types of
syntax?
thanks
|
by: LaEisem |
last post by:
On-the-job, I have "inherited" a lot of old C language software.
A question or two about when "casting" of null pointer constants
is needed has occurred during behind-the-scenes cleanup
of some of that software. That subject seems not to be addressed,
at least not directly, in the C FAQ where FAQ 5.2 seems most relevant.
References:
* C...
|
by: Greenhorn |
last post by:
Hi,
when a function doesn't specify a return type ,value what value is
returned. In the below programme, the function sample()is returning the
value passed to 'k'.
sample(int);
main()
{
int i = 0,j;
j = sample(0);
| |
by: magix8 |
last post by:
Hi,
I have form GET method, example:
index.asp?Type=1&Type=3&Type=4&....
So,
I have something like this at the receiver side to retrieve multiple
Type value and insert into tables.
|
by: Brice Rebsamen |
last post by:
Reading the code from showkey.c (from package kbd) I found this type
of code:
char *m;
m = "RAW";
See below for the complete code. How can this work? I would have used
strdup, or allocation of the memory for m (static or dynamic) then
strncpy.
|
by: =?Utf-8?B?Sm9obg==?= |
last post by:
Hi,
I use Session to save and pass values between pages, (please see
the following). It works fine on my computer, but on the server, I launch the
main page, wait for 20 minutes, and click a button to launch User.aspx, it
seems that it cannot see the current value of Session. There's no
problem to launch User.aspx from the main page within...
|
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...
|
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. ...
|
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...
| |
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...
|
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...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
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...
|
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
|
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...
| |