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

Error in passing multiple variables in a href

Hi,
I need to pass multple variables in a link in order to go to a asp page with
the
two varables.

The following are the values of the variables using response.write:
<%'Response.Write Mypage & "<br>"%>
Exp

<%'Response.Write GrantID & "<br>"%>
4836

The link which I wrote is as follows:

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> & page=<%mypage%>">Report
Main Page</A>

However, when I am refreshing the page to click this link I am getting the
following error: Microsoft VBScript runtime (0x800A000D)
Type mismatch

I would appreciate any help to resolve this. Thanks.

Jul 22 '05 #1
5 6666
page=<%mypage%>">

should be;

page=<%=mypage%>">

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Jack" <Ja**@discussions.microsoft.com> wrote in message news:3F**********************************@microsof t.com...
Hi,
I need to pass multple variables in a link in order to go to a asp page with
the
two varables.

The following are the values of the variables using response.write:
<%'Response.Write Mypage & "<br>"%>
Exp

<%'Response.Write GrantID & "<br>"%>
4836

The link which I wrote is as follows:

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> & page=<%mypage%>">Report
Main Page</A>

However, when I am refreshing the page to click this link I am getting the
following error: Microsoft VBScript runtime (0x800A000D)
Type mismatch

I would appreciate any help to resolve this. Thanks.




Jul 22 '05 #2
not sure exaclty what your doing or why, but right off the bat I see a
mistake

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> & page=<%mypage%>">Report
Main Page</A>
should be

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<% =mypage
%>">Report Main Page</A>
you were missing the equals sign for mypage

you may also want to URL encode the MyPage variable so it passes from page
to page ok

like so

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<%
=Server.URLEncod(mypage) %>">Report Main Page</A>

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com... Hi,
I need to pass multple variables in a link in order to go to a asp page
with
the
two varables.

The following are the values of the variables using response.write:
<%'Response.Write Mypage & "<br>"%>
Exp

<%'Response.Write GrantID & "<br>"%>
4836

The link which I wrote is as follows:

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> &
page=<%mypage%>">Report
Main Page</A>

However, when I am refreshing the page to click this link I am getting the
following error: Microsoft VBScript runtime (0x800A000D)
Type mismatch

I would appreciate any help to resolve this. Thanks.

Jul 22 '05 #3
Thanks to you Kyle and Steven. With the following code:
<A HREF="mainreportagain1.asp?grantid=<%=GrantID%>&pa ge=<%=mypage%>">Report
Main Page</A>
the link works. However, when I see the final page the link is shown as above:

http://localhost/gwisbrandnewready6m...36%20&page=Exp

I would like to know hot to get rid of %20that is coming between 4836 and
the &.
Regards.
"Kyle Peterson" wrote:
not sure exaclty what your doing or why, but right off the bat I see a
mistake

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> & page=<%mypage%>">Report
Main Page</A>


should be

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<% =mypage
%>">Report
Main Page</A>


you were missing the equals sign for mypage

you may also want to URL encode the MyPage variable so it passes from page
to page ok

like so

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<%
=Server.URLEncod(mypage) %>">Report
Main Page</A>

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
Hi,
I need to pass multple variables in a link in order to go to a asp page
with
the
two varables.

The following are the values of the variables using response.write:
<%'Response.Write Mypage & "<br>"%>
Exp

<%'Response.Write GrantID & "<br>"%>
4836

The link which I wrote is as follows:

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> &
page=<%mypage%>">Report
Main Page</A>

However, when I am refreshing the page to click this link I am getting the
following error: Microsoft VBScript runtime (0x800A000D)
Type mismatch

I would appreciate any help to resolve this. Thanks.


Jul 22 '05 #4
Use server.urlencode like I showed you when you build the link and don't
worry about what you see in the url because the request.querystring method
will put the string back together the way you expect it to be when it grabs
the quersytring info

server.urlencode creates url safe strings that won't cause problems when
passing them from page to page

also realize that passing strings this way will be problem is you use too
many characters because there is a limit

I dont remeber what it is.. maybe 1024 characters or something ? maybe 2k
maybe a little more or less ? I can not remember

when passing large amounts of data you should POST your data with a form
instead of
using the queystring... and when using post do do use server.URLEncode
because it is taken care of by the form post

here is a little more on passing data from page to page

http://www.powerasp.com/content/hintstips/asp-forms.asp


"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:F0**********************************@microsof t.com...
Thanks to you Kyle and Steven. With the following code:
<A
HREF="mainreportagain1.asp?grantid=<%=GrantID%>&pa ge=<%=mypage%>">Report
Main Page</A>
the link works. However, when I see the final page the link is shown as
above:

http://localhost/gwisbrandnewready6m...36%20&page=Exp

I would like to know hot to get rid of %20that is coming between 4836 and
the &.
Regards.
"Kyle Peterson" wrote:
not sure exaclty what your doing or why, but right off the bat I see a
mistake

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> &
page=<%mypage%>">Report
> Main Page</A>


should be

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<% =mypage
%>">Report
> Main Page</A>


you were missing the equals sign for mypage

you may also want to URL encode the MyPage variable so it passes from
page
to page ok

like so

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<%
=Server.URLEncod(mypage) %>">Report
> Main Page</A>

"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
> Hi,
> I need to pass multple variables in a link in order to go to a asp page
> with
> the
> two varables.
>
> The following are the values of the variables using response.write:
> <%'Response.Write Mypage & "<br>"%>
> Exp
>
> <%'Response.Write GrantID & "<br>"%>
> 4836
>
> The link which I wrote is as follows:
>
> <A HREF="mainreportagain1.asp?grantid=<%=GrantID%> &
> page=<%mypage%>">Report
> Main Page</A>
>
> However, when I am refreshing the page to click this link I am getting
> the
> following error: Microsoft VBScript runtime (0x800A000D)
> Type mismatch
>
> I would appreciate any help to resolve this. Thanks.
>
>
>


Jul 22 '05 #5
Thanks Kyle for the generous advise. I appreciate it. Regards

"Kyle Peterson" wrote:
Use server.urlencode like I showed you when you build the link and don't
worry about what you see in the url because the request.querystring method
will put the string back together the way you expect it to be when it grabs
the quersytring info

server.urlencode creates url safe strings that won't cause problems when
passing them from page to page

also realize that passing strings this way will be problem is you use too
many characters because there is a limit

I dont remeber what it is.. maybe 1024 characters or something ? maybe 2k
maybe a little more or less ? I can not remember

when passing large amounts of data you should POST your data with a form
instead of
using the queystring... and when using post do do use server.URLEncode
because it is taken care of by the form post

here is a little more on passing data from page to page

http://www.powerasp.com/content/hintstips/asp-forms.asp


"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:F0**********************************@microsof t.com...
Thanks to you Kyle and Steven. With the following code:
<A
HREF="mainreportagain1.asp?grantid=<%=GrantID%>&pa ge=<%=mypage%>">Report
Main Page</A>
the link works. However, when I see the final page the link is shown as
above:

http://localhost/gwisbrandnewready6m...36%20&page=Exp

I would like to know hot to get rid of %20that is coming between 4836 and
the &.
Regards.
"Kyle Peterson" wrote:
not sure exaclty what your doing or why, but right off the bat I see a
mistake

<A HREF="mainreportagain1.asp?grantid=<%=GrantID%> &
page=<%mypage%>">Report
> Main Page</A>

should be

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<% =mypage
%>">Report
> Main Page</A>

you were missing the equals sign for mypage

you may also want to URL encode the MyPage variable so it passes from
page
to page ok

like so

<A HREF="mainreportagain1.asp?grantid=<% =GrantID %> & page=<%
=Server.URLEncod(mypage) %>">Report
> Main Page</A>
"Jack" <Ja**@discussions.microsoft.com> wrote in message
news:3F**********************************@microsof t.com...
> Hi,
> I need to pass multple variables in a link in order to go to a asp page
> with
> the
> two varables.
>
> The following are the values of the variables using response.write:
> <%'Response.Write Mypage & "<br>"%>
> Exp
>
> <%'Response.Write GrantID & "<br>"%>
> 4836
>
> The link which I wrote is as follows:
>
> <A HREF="mainreportagain1.asp?grantid=<%=GrantID%> &
> page=<%mypage%>">Report
> Main Page</A>
>
> However, when I am refreshing the page to click this link I am getting
> the
> following error: Microsoft VBScript runtime (0x800A000D)
> Type mismatch
>
> I would appreciate any help to resolve this. Thanks.
>
>
>


Jul 22 '05 #6

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

Similar topics

1
by: Wayno | last post by:
My php logs are coming up empty. I have done all I can think of, and all that made sense to me. Can someone take a look at my php.ini please and tell me what you think may be the problem. I...
3
by: Fredrik/Sweden | last post by:
Hi folks ! got this problem... i have a table 'Accounts' in my database, which contains a bunch of users. From the main menu i choose "edit user" and all users in the db are presented in a table....
2
by: Chieko Kuroda | last post by:
Hello all, I would like to learn the syntax for passing variables that I retreived from a database to a second asp page. Currently, I'm using: Response.Write "<tr><td>&nbsp;</td><td><Font size=...
12
by: zig | last post by:
I've posted this on alt.comp.lang.coldfusion, but is predominantly a javascript problem: I have a CF query which returns several rows of records. I wanted to have a checkbox on each record of...
2
by: brianwmunz | last post by:
Hi, I'm having a problem passing a variable through a URL because the variable is supposed to hold a URL that has a variable of its own. Here is an idea of what I'm trying to do: href="javascript:...
7
by: Harolds | last post by:
The code below worked in VS 2003 & dotnet framework 1.1 but now in VS 2005 the pmID is evaluated to "" instead of what the value is set to: .... xmlItems.Document = pmXML // Add the pmID...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
1
by: vikjohn | last post by:
I have a new perl script sent to me which is a revision of the one I am currently running. The permissions are the same on each, the paths are correct but I am getting the infamous : The specified...
1
by: morrisqueto | last post by:
Hello, One of my websites just started sending a new rare error. The site has been working for almost 2 years without trouble, but today morning started giving away this error in all my views. ...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.