473,946 Members | 8,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type Mismatch: Session error

10 New Member
Hi,

Im currently updating our email sending functionality of our application. The website is written in classic asp and all codes are really a mess. anyway my problem is that our current process is to use the URL to pass variables from page to page, but i've found out that the max limit is about 2000 characters, and one value we need to pass is the text found in a text area. But the value to be pass is more than 2000 characters which create URL error because of the limit. I've tried using session instead to store the value of the text area but when i try to incorporate the code for session in the vbscript for btnsave_onclick sub, i've got a Type Mismatch: Session error. Do you know the cause of this? below is the code im using:


Expand|Select|Wrap|Line Numbers
  1. Sub btnSave_onclick
  2.     sEventID = frmSave.hdnEventIDNumVal.value
  3.     'sEBody = escape(CStr(document.getElementById("txtMailBody").outerText)) '--Remove because of URL limit
  4.     sESender = escape(CStr(document.getElementById("txtMailSender").value)) '--[JCD,PIIWR05-FR002]
  5.     Session("SesEmailBody") = escape(CStr(document.getElementById("txtMailBody").outerText))  '--Session to replace URL variable.
  6.     window.location.href = "SaveMemo.asp?EventIDNum=" & sEventID & "&page=" & iPage & "&EmailSender=" & sESender 
  7.     '& "&EmailBody=" & sEBody  '--Remove because of URL limit
  8. End Sub
Note: the update of the database is found in SaveMemo.asp

Any suggestion on how to pass the value of the text area (txtMailBody) to savememo.asp?

I would really appreciate a quick response! Thanks!
Oct 11 '07 #1
1 3622
jhardman
3,406 Recognized Expert Specialist
Fanatic,

The session variables (and for that matter, all of the ASP code) can only be accessed while the page is being executed on the server. Any ASP code is dead after the user gets it.

Why aren't you sending this via form? That's the standard way to do it, and a lot simpler than what you have here.

Jared
Oct 14 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
10709
by: Laura | last post by:
Help. Below is my code. Getting Type mismatch error on the noted line. I'm trying to send an array (aryNewD) with 4 columns and x rows to a function to save all the array info into a SQL Server table via a stored procedure. Keep getting this error. Any suggestions? Code: 'ASP: if blnNewD then
2
2978
by: Tom Jordan | last post by:
Hi all, I've thrown together a simple shoppng cart and basket, but I occasionally get a type mismatch error on the basket. For example: Microsoft VBScript runtime error '800a000d' Type mismatch: '' There doesn't seem to be any pattern to it and I can't figure it out at all, I was hoping someone could help!
3
2212
by: Savas Ates | last post by:
i have 3 columns in sql server .. all of them are numeric value when a user enter my site i take the value of userid (numeric one) i assign it as session("userid ") after a query i take 2 value (both numeric again) from my table and write this code
1
2500
by: LJgrnl | last post by:
I've got a type mismatch error that's driving me nutty. Variable blnNoData has the initial value False. If a recordset comes back empty (both .EOF and ..BOF are true) then blnNoData is set to True. I then have an if statement to determine what to write to the screen depending on blnNoData. As long as the if statement is true (doesn't have to go to the else clause), the code runs fine. Otherwise, a type mismatch error is returned. In...
7
2628
by: Jack | last post by:
Hi, I have posted this problem before. Apprently, the suggestion took care of the problem. However, still I am getting the above error message. I am using a session variable to transfer a value from a form to a confirmation.asp page. This value is a calculated field. For most cases this session variable value should be zero. However, instead, it is giving null value and this null value is messing up the update statement which is supposed...
1
2507
by: s_m_b | last post by:
I am having a problem with a page that creates a treeview from a database, by reloading itself on each request for a new folder to be explored. The problem revolves around using an array to store the data, that is copied to a session variable, and reloaded from that with each new view. That is, on first opening the page, the array is created and populated, then copied over; subsequent reloads of the page load the session variable, rather...
4
11975
by: Mike | last post by:
I am getting a type mismatch error when I do a bulk insert. ---Begin Error Msg--- Server: Msg 4864, Level 16, State 1, Line 1 Bulk insert data conversion error (type mismatch) for row 1, column 14 (STDCOST). ---End Error Msg--- The STDCOST is set to decimal (28,14) and is a formatted in Access as a number, single with 14 decimal. I don't know why I would be getting a Type
3
30927
by: Snow | last post by:
Hello: I have Error Type: Microsoft VBScript runtime (0x800A000D) Type mismatch: '' The error happened at this line: if session("systemIdCount" & arrSystems(iLoop)) 0 The code like this:
5
1825
by: daniel.hedz | last post by:
I am generating a usercontrol dynamically successfully, but when I try to find that usercontrol I get a type mismatch. This is what I am doing: //Loading my usercontrol MyWebApp.Folder.Folder.MyUsercontrol myUC = (MyWebApp.Folder.Folder.MyUsercontrol) LoadControl("~/Folder/Folder/MyUsercontrol.ascx");
0
10151
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11145
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11331
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9881
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8244
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6106
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4529
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3532
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.