Welcome to HostingForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Type mismatch: 'Session' error

 
   Web Hosting Problem Solving Community! (Home) -> IIS RSS
Next:  IIS: Re3: HTTP 405 when using POST requests  
Author Message
user1174

External


Since: Dec 04, 2003
Posts: 3



(Msg. 1) Posted: Thu Dec 04, 2003 1:22 pm
Post subject: Type mismatch: 'Session' error
Archived from groups: microsoft>public>inetserver>iis (more info?)

Can anyone help me with this vbscript? Everytime I call this function, I
kept getting

Line: xxx
Char: xx
Error: Type mismatch: 'Session'
Code: 0
URL: http://xxxx.xxxx.com

Here's my VBScript function.

<script LANGUAGE="VBScript">
Sub mToggle(t)
Session("tMenu")=t
End Sub
</script>

Thanks

 >> Stay informed about: Type mismatch: 'Session' error 
Back to top
Login to vote
user641

External


Since: Aug 22, 2003
Posts: 1637



(Msg. 2) Posted: Thu Dec 04, 2003 2:40 pm
Post subject: Re: Type mismatch: 'Session' error [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Sing" <kingdavong.s.RemoveThis@duraauto.com> wrote in message
news:upLMaLouDHA.640@tk2msftngp13.phx.gbl...
 > Can anyone help me with this vbscript? Everytime I call this function, I
 > kept getting
 >
 > Line: xxx
 > Char: xx
 > Error: Type mismatch: 'Session'
 > Code: 0
<font color=purple> > URL: <a style='text-decoration: underline;' href="http://xxxx.xxxx.com</font" target="_blank">http://xxxx.xxxx.com</font</a>>
 >
 > Here's my VBScript function.
 >
 > <script LANGUAGE="VBScript">
 > Sub mToggle(t)
 > Session("tMenu")=t
 > End Sub
 > </script>

You're calling a server object (session) in client-side code ... what are
you trying to do?

--
Tom Kaminski IIS MVP
<a style='text-decoration: underline;' href="http://www.iistoolshed.com/" target="_blank">http://www.iistoolshed.com/</a> - tools, scripts, and utilities for running IIS
<a style='text-decoration: underline;' href="http://mvp.support.microsoft.com/" target="_blank">http://mvp.support.microsoft.com/</a>
<a style='text-decoration: underline;' href="http://www.microsoft.com/windowsserver2003/community/centers/iis/" target="_blank">http://www.microsoft.com/windowsserver2003/community/centers/iis/</a><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Type mismatch: 'Session' error 
Back to top
Login to vote
user1174

External


Since: Dec 04, 2003
Posts: 3



(Msg. 3) Posted: Thu Dec 04, 2003 2:40 pm
Post subject: Re: Type mismatch: 'Session' error [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Actually, I tried to store a session variable so I can call it from another
asp page.

it worked when I used <% session("var")="Test")%>, but why can't I set it
using function?

SK


"Tom Kaminski [MVP]" <tomk (A@T) mvps (D.O.T) org> wrote in message
news:bqnnrd$q3c35@kcweb01.netnews.att.com...
 > "Sing" <kingdavong.s.TakeThisOut@duraauto.com> wrote in message
 > news:upLMaLouDHA.640@tk2msftngp13.phx.gbl...
  > > Can anyone help me with this vbscript? Everytime I call this function,
I
  > > kept getting
  > >
  > > Line: xxx
  > > Char: xx
  > > Error: Type mismatch: 'Session'
  > > Code: 0
<font color=green>  > > URL: <a style='text-decoration: underline;' href="http://xxxx.xxxx.com</font" target="_blank">http://xxxx.xxxx.com</font</a>>
  > >
  > > Here's my VBScript function.
  > >
  > > <script LANGUAGE="VBScript">
  > > Sub mToggle(t)
  > > Session("tMenu")=t
  > > End Sub
  > > </script>
 >
 > You're calling a server object (session) in client-side code ... what are
 > you trying to do?
 >
 > --
 > Tom Kaminski IIS MVP
 > <a style='text-decoration: underline;' href="http://www.iistoolshed.com/" target="_blank">http://www.iistoolshed.com/</a> - tools, scripts, and utilities for running
IIS
<font color=purple> > <a style='text-decoration: underline;' href="http://mvp.support.microsoft.com/</font" target="_blank">http://mvp.support.microsoft.com/</font</a>>
<font color=purple> > <a style='text-decoration: underline;' href="http://www.microsoft.com/windowsserver2003/community/centers/iis/</font" target="_blank">http://www.microsoft.com/windowsserver2003/community/centers/iis/</font</a>>
 >
 >
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Type mismatch: 'Session' error 
Back to top
Login to vote
user641

External


Since: Aug 22, 2003
Posts: 1637



(Msg. 4) Posted: Thu Dec 04, 2003 5:24 pm
Post subject: Re: Type mismatch: 'Session' error [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Sing" <kingdavong.s.TakeThisOut@duraauto.com> wrote in message
news:uXvXqeouDHA.3436@tk2msftngp13.phx.gbl...
 > Actually, I tried to store a session variable so I can call it from
another
 > asp page.
 >
 > it worked when I used <% session("var")="Test")%>, but why can't I set it
 > using function?

you're missing runat=server

--
Tom Kaminski IIS MVP
<a style='text-decoration: underline;' href="http://www.iistoolshed.com/" target="_blank">http://www.iistoolshed.com/</a> - tools, scripts, and utilities for running IIS
<a style='text-decoration: underline;' href="http://mvp.support.microsoft.com/" target="_blank">http://mvp.support.microsoft.com/</a>
<a style='text-decoration: underline;' href="http://www.microsoft.com/windowsserver2003/community/centers/iis/" target="_blank">http://www.microsoft.com/windowsserver2003/community/centers/iis/</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Type mismatch: 'Session' error 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> IIS All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]