Showing posts with label functions. Show all posts
Showing posts with label functions. Show all posts

Saturday, March 31, 2012

subroutines or functions wont work.

any time i try coding a function or a subrouting the page won't run. iget error msg: BC30289: Statement cannot appear within a method body. End of method assumed.

here's my code. PLEASE HELP!, what am i typing wrong??
<%@dotnet.itags.org. Page Language="VB" %>
<script runat="server"
' Insert page code here
'

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<%
Dim arrPrimeNos, arrNames
Sub subPrintArray(arrToPrint, iStartValue, iStopValue)
Dim iCounter
For iCounter = iStartValue to iStopValue
Response.Write(arrToPrint(iCounter))
Response.Write("<BR>")
Next
End Sub
arrPrimeNos=Array(2,3,5)
arrName=Array("John","Mary","Bolek")

'call subroutine
subPrintArray arrNames, 2, 3
%
</form>
</body>
</html>1. You'd better put the server side code in <script> tag if you use inline coding. Using <% %> is not a .net way.

2. You can only call a method (function, subrouting or event handler) from a method (function, subrouting or event handler), so your code need to change like this:


<%@. Page Language="VB" %>
<script runat="server"
Sub page_load

Dim arrPrimeNos() As Integer = {2, 3, 5}
Dim arrNames() As String = {"John", "Mary", "Bolek"}

'call subroutine
subPrintArray arrNames, 2, 3
End Sub

Sub subPrintArray(arrToPrint, iStartValue, iStopValue)
Dim iCounter
For iCounter = iStartValue to iStopValue
Response.Write(arrToPrint(iCounter))
Response.Write("<BR>")
Next
End Sub

</script>
<html>
<head>
</head>
<body>
<form runat="server">
</form>
</body>
</html>


thank you very much

Monday, March 26, 2012

Suggested Graphics Programs for use with VS

Hello -
I have developed the world's ugliest website -- functions well, but it
leaves a lot to be desired aesthetically.
What are the recommended web graphics programs to integrate with Visual
Studio projects? I don't want to just go out and buy something without
knowing it works well with VS.
Also, how would you integrate it? Just copy and paste stuff?
Any help will be greatly appreciated!
--
SandyMicrosoft has several visual editing tools in beta that can generate UI
elements but these tools are for future releases of Vista and so on. There's
really nothing available now in the context I think you are asking.
I've used PaintShop Pro (PSP) for years myself. It is inexpensive, generally
considered easy to use, and rivals the over-priced PhotoShop. Use PSP for
screen captures of various elements from other sites and paste up various
'comps' (compositions) as reference works. I also recommend you use a
reference book such as "Designer's Guide To Color 2" as it is an excellent
resource for color combinations you can recreate using PSP.
Some of the basic techniques designer's use to make page elements distintive
are 'over-lays' and 'juxtapositions' which is artsy-fartsy talk you may be
able to understand simply by observing the use of these techniques at my
current homepage noting I had to beat myself up with CSS to get the effect
without turning the page into an over-weight slow loading sleeper. I'm also
still using multiple stylesheets because IE has been crippleware and I
haven't mastered the dozen and more CSS hacks IE requires to build
'standards compliant' GUIs.
Get a grip on color, page layout, and a couple of artsy-fartsy techniques
and you're all set for a clean page with distinctive design elements but
remember to go easy on the eye shadow ;-)
<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/
[1]
http://www.amazon.com/exec/obidos/t...=gla
nce
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:8C416C92-207F-44EE-AE08-D32FFA07DC47@.microsoft.com...
> Hello -
> I have developed the world's ugliest website -- functions well, but it
> leaves a lot to be desired aesthetically.
> What are the recommended web graphics programs to integrate with Visual
> Studio projects? I don't want to just go out and buy something without
> knowing it works well with VS.
> Also, how would you integrate it? Just copy and paste stuff?
> Any help will be greatly appreciated!
> --
> Sandy
re:
> I've used PaintShop Pro (PSP) for years
That's a good choice.
I use Snagit :
http://www.techsmith.com/products/snagit/default.asp
It does everything I need to do.
PhotoShop is overkill for most situations but
for specialized requirements, it can't be beat.
Its learning curve is quite stiff, though.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"clintonG" < csgallagher@.REMOVETHISTEXTmetromilwaukee
.com> wrote in message
news:uLX$QwqxFHA.664@.tk2msftngp13.phx.gbl...
> Microsoft has several visual editing tools in beta that can generate UI el
ements but
> these tools are for future releases of Vista and so on. There's really not
hing available
> now in the context I think you are asking.
> I've used PaintShop Pro (PSP) for years myself. It is inexpensive, general
ly considered
> easy to use, and rivals the over-priced PhotoShop. Use PSP for screen capt
ures of
> various elements from other sites and paste up various 'comps' (compositio
ns) as
> reference works. I also recommend you use a reference book such as "Design
er's Guide To
> Color 2" as it is an excellent resource for color combinations you can rec
reate using
> PSP.
> Some of the basic techniques designer's use to make page elements distinti
ve are
> 'over-lays' and 'juxtapositions' which is artsy-fartsy talk you may be abl
e to
> understand simply by observing the use of these techniques at my current h
omepage noting
> I had to beat myself up with CSS to get the effect without turning the pag
e into an
> over-weight slow loading sleeper. I'm also still using multiple stylesheet
s because IE
> has been crippleware and I haven't mastered the dozen and more CSS hacks I
E requires to
> build 'standards compliant' GUIs.
> Get a grip on color, page layout, and a couple of artsy-fartsy techniques
and you're all
> set for a clean page with distinctive design elements but remember to go e
asy on the eye
> shadow ;-)
> <%= Clinton Gallagher
> METROmilwaukee (sm) "A Regional Information Service"
> NET csgallagher AT metromilwaukee.com
> URL http://metromilwaukee.com/
> URL http://clintongallagher.metromilwaukee.com/
> [1]
> [url]http://www.amazon.com/exec/obidos/tg/detail/-/B0009WDTIE/104-9118257-0723165?v=glance[/u
rl]

> "Sandy" <Sandy@.discussions.microsoft.com> wrote in message
> news:8C416C92-207F-44EE-AE08-D32FFA07DC47@.microsoft.com...
>
PSP is exceptionally good.
However, when I read this post, I thought the OP 'May' be talking about
general presentation rather than just the graphics themselves, such as that
made easier by using packages like Front Page or Dreamweaver etc.
On that subject, I do know two professional designers ( ASP.NET ) who use
third parties to create their design and then back-engineer ( or add
accurately ) the coding to fit the ASP.NET model.
This way, they dont have the less than intuative VS interface for designing
web sites but have the benefit of all the managability features already
built in to Front Page for example.
This can present difficulties in itself and you really have to know what
your doing, but it's how some people work.
It would be nice if one day Front Page could be absorbed into Visual Studio
( At least all the good bits )
;-)
Regards - Mr N
"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:urQ7G$qxFHA.3856@.tk2msftngp13.phx.gbl...
> re:
> That's a good choice.
> I use Snagit :
> http://www.techsmith.com/products/snagit/default.asp
> It does everything I need to do.
> PhotoShop is overkill for most situations but
> for specialized requirements, it can't be beat.
> Its learning curve is quite stiff, though.
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "clintonG" < csgallagher@.REMOVETHISTEXTmetromilwaukee
.com> wrote in message
> news:uLX$QwqxFHA.664@.tk2msftngp13.phx.gbl...
>
>
>
Your comments about Colour are both interesting and incisive.
I think teaching Software Engineers to appreciate Colour may be more
difficult than teaching artists to design web sites. Logical thinkers
rarely make great artists in my humble opinion (get ready for the
flames!!!), although I am sure there are exceptions to the rule.
Marketing departments also have their own interesting take on use of
colours; apparently colours signify things to people. For example, the Roman
Purple/Blue promotes a feeling of reliability, depth and maturity.
All good stuff as they say !
Cheers - Mr N. . . .
"clintonG" < csgallagher@.REMOVETHISTEXTmetromilwaukee
.com> wrote in message
news:uLX$QwqxFHA.664@.tk2msftngp13.phx.gbl...
> Microsoft has several visual editing tools in beta that can generate UI
> elements but these tools are for future releases of Vista and so on.
> There's really nothing available now in the context I think you are
> asking.
> I've used PaintShop Pro (PSP) for years myself. It is inexpensive,
> generally considered easy to use, and rivals the over-priced PhotoShop.
> Use PSP for screen captures of various elements from other sites and paste
> up various 'comps' (compositions) as reference works. I also recommend you
> use a reference book such as "Designer's Guide To Color 2" as it is an
> excellent resource for color combinations you can recreate using PSP.
> Some of the basic techniques designer's use to make page elements
> distintive are 'over-lays' and 'juxtapositions' which is artsy-fartsy talk
> you may be able to understand simply by observing the use of these
> techniques at my current homepage noting I had to beat myself up with CSS
> to get the effect without turning the page into an over-weight slow
> loading sleeper. I'm also still using multiple stylesheets because IE has
> been crippleware and I haven't mastered the dozen and more CSS hacks IE
> requires to build 'standards compliant' GUIs.
> Get a grip on color, page layout, and a couple of artsy-fartsy techniques
> and you're all set for a clean page with distinctive design elements but
> remember to go easy on the eye shadow ;-)
> <%= Clinton Gallagher
> METROmilwaukee (sm) "A Regional Information Service"
> NET csgallagher AT metromilwaukee.com
> URL http://metromilwaukee.com/
> URL http://clintongallagher.metromilwaukee.com/
> [1]
> http://www.amazon.com/exec/obidos/t...=g
lance
>
> "Sandy" <Sandy@.discussions.microsoft.com> wrote in message
> news:8C416C92-207F-44EE-AE08-D32FFA07DC47@.microsoft.com...
>

Suggested Graphics Programs for use with VS

Hello -

I have developed the world's ugliest website -- functions well, but it
leaves a lot to be desired aesthetically.

What are the recommended web graphics programs to integrate with Visual
Studio projects? I don't want to just go out and buy something without
knowing it works well with VS.

Also, how would you integrate it? Just copy and paste stuff?

Any help will be greatly appreciated!
--
SandyMicrosoft has several visual editing tools in beta that can generate UI
elements but these tools are for future releases of Vista and so on. There's
really nothing available now in the context I think you are asking.

I've used PaintShop Pro (PSP) for years myself. It is inexpensive, generally
considered easy to use, and rivals the over-priced PhotoShop. Use PSP for
screen captures of various elements from other sites and paste up various
'comps' (compositions) as reference works. I also recommend you use a
reference book such as "Designer's Guide To Color 2" as it is an excellent
resource for color combinations you can recreate using PSP.

Some of the basic techniques designer's use to make page elements distintive
are 'over-lays' and 'juxtapositions' which is artsy-fartsy talk you may be
able to understand simply by observing the use of these techniques at my
current homepage noting I had to beat myself up with CSS to get the effect
without turning the page into an over-weight slow loading sleeper. I'm also
still using multiple stylesheets because IE has been crippleware and I
haven't mastered the dozen and more CSS hacks IE requires to build
'standards compliant' GUIs.

Get a grip on color, page layout, and a couple of artsy-fartsy techniques
and you're all set for a clean page with distinctive design elements but
remember to go easy on the eye shadow ;-)

<%= Clinton Gallagher
METROmilwaukee (sm) "A Regional Information Service"
NET csgallagher AT metromilwaukee.com
URL http://metromilwaukee.com/
URL http://clintongallagher.metromilwaukee.com/

[1]
http://www.amazon.com/exec/obidos/t...723165?v=glance

"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:8C416C92-207F-44EE-AE08-D32FFA07DC47@.microsoft.com...
> Hello -
> I have developed the world's ugliest website -- functions well, but it
> leaves a lot to be desired aesthetically.
> What are the recommended web graphics programs to integrate with Visual
> Studio projects? I don't want to just go out and buy something without
> knowing it works well with VS.
> Also, how would you integrate it? Just copy and paste stuff?
> Any help will be greatly appreciated!
> --
> Sandy
re:
> I've used PaintShop Pro (PSP) for years

That's a good choice.

I use Snagit :

http://www.techsmith.com/products/snagit/default.asp

It does everything I need to do.

PhotoShop is overkill for most situations but
for specialized requirements, it can't be beat.

Its learning curve is quite stiff, though.

Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Espaol : http://asp.net.do/foros/
======================================
"clintonG" <csgallagher@.REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uLX$QwqxFHA.664@.tk2msftngp13.phx.gbl...
> Microsoft has several visual editing tools in beta that can generate UI elements but
> these tools are for future releases of Vista and so on. There's really nothing available
> now in the context I think you are asking.
> I've used PaintShop Pro (PSP) for years myself. It is inexpensive, generally considered
> easy to use, and rivals the over-priced PhotoShop. Use PSP for screen captures of
> various elements from other sites and paste up various 'comps' (compositions) as
> reference works. I also recommend you use a reference book such as "Designer's Guide To
> Color 2" as it is an excellent resource for color combinations you can recreate using
> PSP.
> Some of the basic techniques designer's use to make page elements distintive are
> 'over-lays' and 'juxtapositions' which is artsy-fartsy talk you may be able to
> understand simply by observing the use of these techniques at my current homepage noting
> I had to beat myself up with CSS to get the effect without turning the page into an
> over-weight slow loading sleeper. I'm also still using multiple stylesheets because IE
> has been crippleware and I haven't mastered the dozen and more CSS hacks IE requires to
> build 'standards compliant' GUIs.
> Get a grip on color, page layout, and a couple of artsy-fartsy techniques and you're all
> set for a clean page with distinctive design elements but remember to go easy on the eye
> shadow ;-)
> <%= Clinton Gallagher
> METROmilwaukee (sm) "A Regional Information Service"
> NET csgallagher AT metromilwaukee.com
> URL http://metromilwaukee.com/
> URL http://clintongallagher.metromilwaukee.com/
> [1]
> http://www.amazon.com/exec/obidos/t...723165?v=glance

> "Sandy" <Sandy@.discussions.microsoft.com> wrote in message
> news:8C416C92-207F-44EE-AE08-D32FFA07DC47@.microsoft.com...
>> Hello -
>>
>> I have developed the world's ugliest website -- functions well, but it
>> leaves a lot to be desired aesthetically.
>>
>> What are the recommended web graphics programs to integrate with Visual
>> Studio projects? I don't want to just go out and buy something without
>> knowing it works well with VS.
>>
>> Also, how would you integrate it? Just copy and paste stuff?
>>
>> Any help will be greatly appreciated!
>> --
>> Sandy
PSP is exceptionally good.

However, when I read this post, I thought the OP 'May' be talking about
general presentation rather than just the graphics themselves, such as that
made easier by using packages like Front Page or Dreamweaver etc.

On that subject, I do know two professional designers ( ASP.NET ) who use
third parties to create their design and then back-engineer ( or add
accurately ) the coding to fit the ASP.NET model.

This way, they dont have the less than intuative VS interface for designing
web sites but have the benefit of all the managability features already
built in to Front Page for example.

This can present difficulties in itself and you really have to know what
your doing, but it's how some people work.

It would be nice if one day Front Page could be absorbed into Visual Studio
( At least all the good bits )

;-)

Regards - Mr N

"Juan T. Llibre" <nomailreplies@.nowhere.com> wrote in message
news:urQ7G$qxFHA.3856@.tk2msftngp13.phx.gbl...
> re:
>> I've used PaintShop Pro (PSP) for years
> That's a good choice.
> I use Snagit :
> http://www.techsmith.com/products/snagit/default.asp
> It does everything I need to do.
> PhotoShop is overkill for most situations but
> for specialized requirements, it can't be beat.
> Its learning curve is quite stiff, though.
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Espaol : http://asp.net.do/foros/
> ======================================
> "clintonG" <csgallagher@.REMOVETHISTEXTmetromilwaukee.com> wrote in message
> news:uLX$QwqxFHA.664@.tk2msftngp13.phx.gbl...
>> Microsoft has several visual editing tools in beta that can generate UI
>> elements but these tools are for future releases of Vista and so on.
>> There's really nothing available now in the context I think you are
>> asking.
>>
>> I've used PaintShop Pro (PSP) for years myself. It is inexpensive,
>> generally considered easy to use, and rivals the over-priced PhotoShop.
>> Use PSP for screen captures of various elements from other sites and
>> paste up various 'comps' (compositions) as reference works. I also
>> recommend you use a reference book such as "Designer's Guide To Color 2"
>> as it is an excellent resource for color combinations you can recreate
>> using PSP.
>>
>> Some of the basic techniques designer's use to make page elements
>> distintive are 'over-lays' and 'juxtapositions' which is artsy-fartsy
>> talk you may be able to understand simply by observing the use of these
>> techniques at my current homepage noting I had to beat myself up with CSS
>> to get the effect without turning the page into an over-weight slow
>> loading sleeper. I'm also still using multiple stylesheets because IE has
>> been crippleware and I haven't mastered the dozen and more CSS hacks IE
>> requires to build 'standards compliant' GUIs.
>>
>> Get a grip on color, page layout, and a couple of artsy-fartsy techniques
>> and you're all set for a clean page with distinctive design elements but
>> remember to go easy on the eye shadow ;-)
>>
>> <%= Clinton Gallagher
>> METROmilwaukee (sm) "A Regional Information Service"
>> NET csgallagher AT metromilwaukee.com
>> URL http://metromilwaukee.com/
>> URL http://clintongallagher.metromilwaukee.com/
>>
>> [1]
>> http://www.amazon.com/exec/obidos/t...723165?v=glance
>
>> "Sandy" <Sandy@.discussions.microsoft.com> wrote in message
>> news:8C416C92-207F-44EE-AE08-D32FFA07DC47@.microsoft.com...
>>> Hello -
>>>
>>> I have developed the world's ugliest website -- functions well, but it
>>> leaves a lot to be desired aesthetically.
>>>
>>> What are the recommended web graphics programs to integrate with Visual
>>> Studio projects? I don't want to just go out and buy something without
>>> knowing it works well with VS.
>>>
>>> Also, how would you integrate it? Just copy and paste stuff?
>>>
>>> Any help will be greatly appreciated!
>>> --
>>> Sandy
>>
>>
Your comments about Colour are both interesting and incisive.

I think teaching Software Engineers to appreciate Colour may be more
difficult than teaching artists to design web sites. Logical thinkers
rarely make great artists in my humble opinion (get ready for the
flames!!!), although I am sure there are exceptions to the rule.

Marketing departments also have their own interesting take on use of
colours; apparently colours signify things to people. For example, the Roman
Purple/Blue promotes a feeling of reliability, depth and maturity.

All good stuff as they say !

Cheers - Mr N. . . .

"clintonG" <csgallagher@.REMOVETHISTEXTmetromilwaukee.com> wrote in message
news:uLX$QwqxFHA.664@.tk2msftngp13.phx.gbl...
> Microsoft has several visual editing tools in beta that can generate UI
> elements but these tools are for future releases of Vista and so on.
> There's really nothing available now in the context I think you are
> asking.
> I've used PaintShop Pro (PSP) for years myself. It is inexpensive,
> generally considered easy to use, and rivals the over-priced PhotoShop.
> Use PSP for screen captures of various elements from other sites and paste
> up various 'comps' (compositions) as reference works. I also recommend you
> use a reference book such as "Designer's Guide To Color 2" as it is an
> excellent resource for color combinations you can recreate using PSP.
> Some of the basic techniques designer's use to make page elements
> distintive are 'over-lays' and 'juxtapositions' which is artsy-fartsy talk
> you may be able to understand simply by observing the use of these
> techniques at my current homepage noting I had to beat myself up with CSS
> to get the effect without turning the page into an over-weight slow
> loading sleeper. I'm also still using multiple stylesheets because IE has
> been crippleware and I haven't mastered the dozen and more CSS hacks IE
> requires to build 'standards compliant' GUIs.
> Get a grip on color, page layout, and a couple of artsy-fartsy techniques
> and you're all set for a clean page with distinctive design elements but
> remember to go easy on the eye shadow ;-)
> <%= Clinton Gallagher
> METROmilwaukee (sm) "A Regional Information Service"
> NET csgallagher AT metromilwaukee.com
> URL http://metromilwaukee.com/
> URL http://clintongallagher.metromilwaukee.com/
> [1]
> http://www.amazon.com/exec/obidos/t...723165?v=glance
>
> "Sandy" <Sandy@.discussions.microsoft.com> wrote in message
> news:8C416C92-207F-44EE-AE08-D32FFA07DC47@.microsoft.com...
>> Hello -
>>
>> I have developed the world's ugliest website -- functions well, but it
>> leaves a lot to be desired aesthetically.
>>
>> What are the recommended web graphics programs to integrate with Visual
>> Studio projects? I don't want to just go out and buy something without
>> knowing it works well with VS.
>>
>> Also, how would you integrate it? Just copy and paste stuff?
>>
>> Any help will be greatly appreciated!
>> --
>> Sandy

Suggestion for an "imagemap-like" location feature -- methods?

Hi, I'm creating an asp.net application and one of the functions I need
is to click on a "Where Is This Office Located?" button. In a table,
each employee will have an office code location entered.
I then need to have the office layout image load and have the name of
that person highlighted such as bold/red (in the correct office
location).
Similar to an image map, but not quite. I do not want to click on an
office "hotspot" and go to a URL. Not finding anything in my searches
other than typical image map methods.
Any guidance or suggestions much appreciated!
Thanks, Kat
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!Hi Kat,
Actually, nothing at all like an image map. Just an image. However, it has
to be dynamically-generated, as you want to "draw on it."
Let's analyze your requirements:
1. A user clicks on a link or button, or selects an item from a drop-down
list , or what-have-you. (I don't know which you would rather use)
2. A database is queried to get the file location of the appropriate image
and/or information from the database.
3. An office layout image is returned, with the user's name drawn on itin
bold/red letters.
Okay, so you can figure out number 1 for yourself. As for number 2 and 3:
a. The database is queried. Easy enough.
b. The image is fetched from its file location. Easy enough.
c. The image is drawn on. This is done using the System.Drawing and
System.Drawing.Imaging namespaces.
d. The image is returned to the browser. This requires that the image URL
point to an ASPX page that fetches the image, draws on it, sets the
Response.ContentType to "image/jpeg" (whatever MIME type you need), and
saves the image to the Response.OutputStream.
Okay, wait a second. We nede to back up. First, you need to identify the
user. This can be done with a "login" form in which the user supplies a user
id and password, and the data is stored on the server (Session, database,
Application Cache, etc).
That should do it!
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Neither a follower nor a lender be.
"KatB" <nospam@.comcast.net> wrote in message
news:ebePmxb%23EHA.1296@.TK2MSFTNGP10.phx.gbl...
> Hi, I'm creating an asp.net application and one of the functions I need
> is to click on a "Where Is This Office Located?" button. In a table,
> each employee will have an office code location entered.
> I then need to have the office layout image load and have the name of
> that person highlighted such as bold/red (in the correct office
> location).
> Similar to an image map, but not quite. I do not want to click on an
> office "hotspot" and go to a URL. Not finding anything in my searches
> other than typical image map methods.
> Any guidance or suggestions much appreciated!
> Thanks, Kat
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
Kevin, very helpful, thanks. If I use a floor plan image with all the
office names already on it, and then just add a star graphic or
something to indicate the position requested...how would I know the
position of where to draw the star?
I assume I would have a db table of person, office number, and then the
coordinates of the "star". How would I determine those coordinates?
Sorry, if I'm being stupid!
In the meantime, I'll go read up on system.drawing having not used it
before.
Thanks, Kat
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
Hi Kat, there's a good layer of dust in this part of my mental technical
archives, so I leave the implementation details to you.
As I recall, the original image map technology, which I remember being
referred to as "server side imagemaps", could be used to determine the X, Y
coordinate within an image that a user clicked on. It was fairly
straightforward; you add a tag to your image (ISMAP, maybe) and a Url, and
when the user clicks somewhere on the image, a hit is made to your Url.
Again lots of dust here; check this carefully but I recall that the Url was
in a nonstandard format, something like;
/somepage.aspx?23,48
I.e. you have a querystring but it's not a typical key-value querystring.
You'll need to process it a little differently; grab the entire querystring
and split on the comma, or something similar.
The point is, it should be easy to create an administration page that allows
you to modify the details of an Office record.
Within this page, you could show the floorplan contain the star of the
current location of the office. Then if the admin-user clicks on the
imagemap, you capture the new X, Y, and update the Office record.
This is about the cheapest, crudest, simplest way I can think of to capture
image coordinates through a web app.
If you're lucky, there may be some javascript that can respond to the click,
and allow you to create a true ASP.NET control using true ASP.NET postbacks
and so on. If you're fantastically lucky, someone may have done this for
you already.
The trickiest part will be making sure that you know the OfficeID that the
X, Y should be applied to on the receiving page. You may need to insert the
OfficeID into the Url that's posted back to, so that you can process it out
at the receiving end. On that note, the Hyperlink control may give you the
capabilities you need, or you may be able to derive from it to get the right
capabilities.
Other approaches;
+ Use Flash
+ Use a WinForms application for capturing the X, Y clicks and updating the
Office records
+ Use ASP.NET but give the user some up, down, left, right arrows rather
than the ability to click on the image.
+ Use ASP.NET but put a series of small clickable carats along the top and
left of the floorplan image. These would be standard LinkButtons with a
small graphical carat. Clicking these would set the X or Y, respectively to
a value matching the position of the carat.
+ Build an ActiveX control
+ Build a .NET winforms control that's delivered to the webpage (the user
must have .NET installed however).
HTML is quite limited from this perspective, but I'm fairly certain the
tools are there if you're willing to make them work.
Best of luck;
/// M
"KatB" <nospam@.comcast.net> wrote in message
news:eZdOOVk#EHA.3616@.TK2MSFTNGP11.phx.gbl...
> Kevin, very helpful, thanks. If I use a floor plan image with all the
> office names already on it, and then just add a star graphic or
> something to indicate the position requested...how would I know the
> position of where to draw the star?
> I assume I would have a db table of person, office number, and then the
> coordinates of the "star". How would I determine those coordinates?
> Sorry, if I'm being stupid!
> In the meantime, I'll go read up on system.drawing having not used it
> before.
> Thanks, Kat
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
If you are open to use of commercial components to aid
in your project our MetaDraw control may be helpful
In MetaDraw you would have the office map created along with the
names of the all different individuals as text objects at their proper
locations. Save this layout as a MetaDraw data file. This is
all done ahead of time. Then when user clicks in a list on
a name you want to highlight you can tell MetaDraw to either
Hide all names but the desired name, or show all names but
only highlight ( bold or a bright color ) the desired name.
MetaDraw can be used server side in which case you have
MetaDraw save the resulting image ( with highlighted name, etc)
as a standard GIF, JPG, or PNG file and send that down to
the client. A more flexible approach is to use MetaDraw client
side - Sending the whole layout with all names, and then have
client side script hide or show the names, or even blink a name
on or off. You could also change the color of the room boundaries,
Scroll, Zoom, Print... etc.
Take a look at www.Bennet-Tec.com
Reply here if this seems like something of interest.
* * Please include a copy of this message with your reply
Jeff Bennett
Jeff @. Bennet-Tec.Com
* Bennet-Tec Information Systems, Inc
* 50 Jericho Tpk, Jericho, NY 11753
* Phone 516 997 5596, Fax - 5597
* RELIABLE Components Make You Look Sharp!
* TList/Pro * ALLText HT/Pro * MetaDraw *
* Custom Software Development Services Too.
* WWW.Bennet-Tec.Com
=================== ===================

Suggestion for an "imagemap-like" location feature -- methods?

Hi, I'm creating an asp.net application and one of the functions I need
is to click on a "Where Is This Office Located?" button. In a table,
each employee will have an office code location entered.

I then need to have the office layout image load and have the name of
that person highlighted such as bold/red (in the correct office
location).

Similar to an image map, but not quite. I do not want to click on an
office "hotspot" and go to a URL. Not finding anything in my searches
other than typical image map methods.

Any guidance or suggestions much appreciated!

Thanks, Kat

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hi Kat,

Actually, nothing at all like an image map. Just an image. However, it has
to be dynamically-generated, as you want to "draw on it."

Let's analyze your requirements:

1. A user clicks on a link or button, or selects an item from a drop-down
list , or what-have-you. (I don't know which you would rather use)
2. A database is queried to get the file location of the appropriate image
and/or information from the database.
3. An office layout image is returned, with the user's name drawn on itin
bold/red letters.

Okay, so you can figure out number 1 for yourself. As for number 2 and 3:

a. The database is queried. Easy enough.
b. The image is fetched from its file location. Easy enough.
c. The image is drawn on. This is done using the System.Drawing and
System.Drawing.Imaging namespaces.
d. The image is returned to the browser. This requires that the image URL
point to an ASPX page that fetches the image, draws on it, sets the
Response.ContentType to "image/jpeg" (whatever MIME type you need), and
saves the image to the Response.OutputStream.

Okay, wait a second. We nede to back up. First, you need to identify the
user. This can be done with a "login" form in which the user supplies a user
id and password, and the data is stored on the server (Session, database,
Application Cache, etc).

That should do it!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"KatB" <nospam@.comcast.net> wrote in message
news:ebePmxb%23EHA.1296@.TK2MSFTNGP10.phx.gbl...
> Hi, I'm creating an asp.net application and one of the functions I need
> is to click on a "Where Is This Office Located?" button. In a table,
> each employee will have an office code location entered.
> I then need to have the office layout image load and have the name of
> that person highlighted such as bold/red (in the correct office
> location).
> Similar to an image map, but not quite. I do not want to click on an
> office "hotspot" and go to a URL. Not finding anything in my searches
> other than typical image map methods.
> Any guidance or suggestions much appreciated!
> Thanks, Kat
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Kevin, very helpful, thanks. If I use a floor plan image with all the
office names already on it, and then just add a star graphic or
something to indicate the position requested...how would I know the
position of where to draw the star?

I assume I would have a db table of person, office number, and then the
coordinates of the "star". How would I determine those coordinates?
Sorry, if I'm being stupid!

In the meantime, I'll go read up on system.drawing having not used it
before.

Thanks, Kat

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Hi Kat, there's a good layer of dust in this part of my mental technical
archives, so I leave the implementation details to you.

As I recall, the original image map technology, which I remember being
referred to as "server side imagemaps", could be used to determine the X, Y
coordinate within an image that a user clicked on. It was fairly
straightforward; you add a tag to your image (ISMAP, maybe) and a Url, and
when the user clicks somewhere on the image, a hit is made to your Url.
Again lots of dust here; check this carefully but I recall that the Url was
in a nonstandard format, something like;

/somepage.aspx?23,48

I.e. you have a querystring but it's not a typical key-value querystring.
You'll need to process it a little differently; grab the entire querystring
and split on the comma, or something similar.

The point is, it should be easy to create an administration page that allows
you to modify the details of an Office record.

Within this page, you could show the floorplan contain the star of the
current location of the office. Then if the admin-user clicks on the
imagemap, you capture the new X, Y, and update the Office record.

This is about the cheapest, crudest, simplest way I can think of to capture
image coordinates through a web app.

If you're lucky, there may be some javascript that can respond to the click,
and allow you to create a true ASP.NET control using true ASP.NET postbacks
and so on. If you're fantastically lucky, someone may have done this for
you already.

The trickiest part will be making sure that you know the OfficeID that the
X, Y should be applied to on the receiving page. You may need to insert the
OfficeID into the Url that's posted back to, so that you can process it out
at the receiving end. On that note, the Hyperlink control may give you the
capabilities you need, or you may be able to derive from it to get the right
capabilities.

Other approaches;

+ Use Flash
+ Use a WinForms application for capturing the X, Y clicks and updating the
Office records
+ Use ASP.NET but give the user some up, down, left, right arrows rather
than the ability to click on the image.
+ Use ASP.NET but put a series of small clickable carats along the top and
left of the floorplan image. These would be standard LinkButtons with a
small graphical carat. Clicking these would set the X or Y, respectively to
a value matching the position of the carat.
+ Build an ActiveX control
+ Build a .NET winforms control that's delivered to the webpage (the user
must have .NET installed however).

HTML is quite limited from this perspective, but I'm fairly certain the
tools are there if you're willing to make them work.

Best of luck;

/// M

"KatB" <nospam@.comcast.net> wrote in message
news:eZdOOVk#EHA.3616@.TK2MSFTNGP11.phx.gbl...
> Kevin, very helpful, thanks. If I use a floor plan image with all the
> office names already on it, and then just add a star graphic or
> something to indicate the position requested...how would I know the
> position of where to draw the star?
> I assume I would have a db table of person, office number, and then the
> coordinates of the "star". How would I determine those coordinates?
> Sorry, if I'm being stupid!
> In the meantime, I'll go read up on system.drawing having not used it
> before.
> Thanks, Kat
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
If you are open to use of commercial components to aid
in your project our MetaDraw control may be helpful

In MetaDraw you would have the office map created along with the
names of the all different individuals as text objects at their proper
locations. Save this layout as a MetaDraw data file. This is
all done ahead of time. Then when user clicks in a list on
a name you want to highlight you can tell MetaDraw to either
Hide all names but the desired name, or show all names but
only highlight ( bold or a bright color ) the desired name.

MetaDraw can be used server side in which case you have
MetaDraw save the resulting image ( with highlighted name, etc)
as a standard GIF, JPG, or PNG file and send that down to
the client. A more flexible approach is to use MetaDraw client
side - Sending the whole layout with all names, and then have
client side script hide or show the names, or even blink a name
on or off. You could also change the color of the room boundaries,
Scroll, Zoom, Print... etc.

Take a look at www.Bennet-Tec.com

Reply here if this seems like something of interest.

* * Please include a copy of this message with your reply

Jeff Bennett
Jeff @. Bennet-Tec.Com

* Bennet-Tec Information Systems, Inc
* 50 Jericho Tpk, Jericho, NY 11753
* Phone 516 997 5596, Fax - 5597
* RELIABLE Components Make You Look Sharp!
* TList/Pro * ALLText HT/Pro * MetaDraw *
* Custom Software Development Services Too.
* WWW.Bennet-Tec.Com
=================== ===================