ASP, ADO and Dictionary object runtime problem!

C

CharlesEF

Hi All,

This has me stumped. I have used a VBScript dictionary object to load
column names and their values so I can use them when I build the web
page.

When I do this, I get the correct value printed on the page:
<%Response.Write("Company Name is: " & objDict.Item("companyname"))%>

But, when I try to use it in an HTML tag, like this, I get a runtime
error '800a01b6' - Object doesn't support this property or method:
'Item':
<input type="text" maxLength=60 size=60 name=comName
value="<%objDict.Item("companyname")%>"></input>

Why does it work in one form and not the other? I have spent so much
time on this that I need to ask for help.


Thanks for any input,

Charles
 
M

McKirahan

Hi All,

This has me stumped. I have used a VBScript dictionary object to load
column names and their values so I can use them when I build the web
page.

When I do this, I get the correct value printed on the page:
<%Response.Write("Company Name is: " & objDict.Item("companyname"))%>

But, when I try to use it in an HTML tag, like this, I get a runtime
error '800a01b6' - Object doesn't support this property or method:
'Item':
<input type="text" maxLength=60 size=60 name=comName
value="<%objDict.Item("companyname")%>"></input>

Why does it work in one form and not the other? I have spent so much
time on this that I need to ask for help.


Thanks for any input,

Charles

Try it with an equal sign:

<input type="text" maxLength="60" size="60" name="comName"
value="<%=objDict.Item("companyname")%>"></input>
 
C

CharlesEF

Hi,

Thank you very much. For whatever reason I never tried using the equal
sign. Of all the posts I searched regarding this problem I never saw
one that used the equal sign either. Guess I did not search well
enough.

Very simple solution to a full day of wasted time.


Thank you very much,

Charles
 
P

Patrice

= is a shortcut for Response.Write. You'll have to use it or not depending
wether you want to write something to the output or just perform some code
that doesn't write anything to the output...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top