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

easier way to to type compairisions

i have:
if gvr.FindControl(objPosNeg1).GetType.ToString =
"System.Web.UI.WebControls.label" then
....
....
....
end if
where gvr is a gridviewrow, objPosNeg is an object and in this case the
object is a label. On other occations it will be a hyperlink.
I'd like to do a direct type compairison, but can't find the way to do it.
Is there a way to do:
IF obj.typeof = (or is) ...WebControls.label THEN
....
....
....
ELSE IF
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
May 21 '07 #1
1 822
i should have included that i know i can use:
gvr.FindControl(objPosNeg1).Equals("System.Web.UI. WebControls.Label")
but it's just a flavor of the same thing.

THANKS
KES
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"WebBuilder451" wrote:
i have:
if gvr.FindControl(objPosNeg1).GetType.ToString =
"System.Web.UI.WebControls.label" then
...
...
...
end if
where gvr is a gridviewrow, objPosNeg is an object and in this case the
object is a label. On other occations it will be a hyperlink.
I'd like to do a direct type compairison, but can't find the way to do it.
Is there a way to do:
IF obj.typeof = (or is) ...WebControls.label THEN
...
...
...
ELSE IF
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
May 21 '07 #2

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

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
1
by: Kenneth McDonald | last post by:
I'm working on the 0.8 release of my 'rex' module, and would appreciate feedback, suggestions, and criticism as I work towards finalizing the API and feature sets. rex is a module intended to make...
66
by: Mitchell S. Honnert | last post by:
In some recent posts, I've seen people who seem to be waxing nostalgic with respect to the "ease of use" of Visual Basic 6. I can't quite put my finger on it, but they seem to be implying that VB6...
22
by: walter.preuninger | last post by:
Is there an easier way to code the cmp procedure without going thru all the pointer manipulations? #include <stdlib.h> #include <string.h> int cmp(const void *i, const void *j) { void *p1,...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.