Passing Variable With Querystring - Update Db - Error !?
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. The first column 'Pnr' is a unique ID for
each user that i made appear as a link. clicking on one userID should
present a form where the picked users userdata is already filled in so
i can easily edit it and then move on to submit the form to update the
db. i get to the part where all users are listed nicely in a table,
but clicking on one, i get this error:
Error Type:
ADODB.Recordset (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested
name or ordinal.
/VS_Files/updateUserForm.asp, line 19
I think i'm doing something wrong with passing a value with the
querystring...? Code:
so far it works fine. It shows the value in the text box on the page. I am trying to post this page with all the form fields to a new page that emails all the variables that are on this page. The form tag looks like
In orderform3.asp, i am requesting the values for all the form fields as follows before emailing all the fields to myself:
strBody = strBody & Request.Form("Account_Name") 'strbody is the variable that adds all the form fields to the body of the email strBody = strBody & vbCrLf strBody = strBody & Request.Form("Contact_Name") strBody = strBody & vbCrLf strBody = strBody & Request.Form("Template")
Here is the problem...I am getting the email with the values filled in except for "Template" and I cannot figure out why. Is there something that I am doing wrong? i have to mention that there is no DB behind this site...it is just a static web site with an email script in it.
I am getting the following error when I run my page I just created. The first time I run the page I get this error, if I run the page a second time I get no error and everything works fine. This is the case everytime.
I'm trying to create a link (SEE LINK BELOW) to a pop-up window. My problem is my sTargetPage variable is a url containing a querystring variable. When myPopUp.asp opens and I get my sPage query string value, it returns myTargetpage.asp?qs=1 and clips the 2nd querystring value pair.
Can someone help me construct a link so myPopUp.asp preserves the entire query string? I tried using the Server.HtmlEncode comand in "FAILED ATTEMPT" below, but I'm still losing any querystring pairs after the 1st qs pair.
I am passing a value held in a session variable on a url. It works fine locally testing but when I put it on the main web server the value disappears. Nothing fancy here, real simple...what I am missing ?
I am new to ASP.NET 2.0 and I am developing a small application which originally consists of 2 pages. The first page displays a GridView Control loaded with data from a sqlDataSouce. Such a GridView has a field that is a hyperlink to the second page which is supposed to display the detail of the record.
What I want to do is to send a QueryString Parameter to the second page with the key to retrieve the record selected and show the information in detail (a long description, a picture of a product, comments, price, etc.). I have not written a single line of code (code-behind) for the first page. How can I get the second page and send the querystring parameter?
My problem is I'm paginating database results into a table, and each page takes the sql statement from the querystring, however because i use LIKE %...% the '%' get ignored and I get an error. For example the sql in the querystring is..
SELECT * FROM posters WHERE poster_name LIKE '%a%' AND poster_file IS NOT NULL ORDER BY poster_name ASC;
But when it's extracted from the querystring it is this:
SELECT * FROM posters WHERE poster_name LIKE 'a' AND poster_file IS NOT NULL ORDER BY poster_name ASC;
So i get an error because the wildcards have been removed. Any way around this?
I am passing a sql string thru my querystring for the next page to capture.
example: www.xxxxxxxx.com/index.asp?str=select * from table where name like '%doe%'
Passing a basic string works fine. But, when I use the LIKE statement it does not work. I know it's because of the % sign, so how do I translate this thru, so that the following page picks up the percent sign?
I'm trying to pass the wildcard variable % to another page via request.querystring.
When I go to pick up the variable through request.querystring, it will never diplay the "%" if one is included. It will diplay any other characters included in the variable though.
i did print out teh variable headertext at addsection.asp, what i get is from the variable headertext is PE, so what shd i out in the url to get PE&CCA in my addsection page?
I have a PHP page with a form which captures some information about a user before then redirecting the user to a ASP driven website. Thing is, there is obviously nothing to stop the user from simply noting the URL of the site they have been redirected to, and then going direct to the site everytime after.
Is there a way I can make the homepage of the ASP page only open, if it has been passed a hidden variable (by _POST). I could probably do this if the referral site was in PHP, but I have no experience of ASP. I assume i will need to input a few lines of code at the beginning of the ASP homepage which look for the POST variable and only open the site if it has been passed from the PHP page?
I'm building a site with news headlines on my index.asp page. I want these headlines to link to a file called story.asp. This page would contain the entire article. The data is coming out of Access.
Am I supposed to use a querystring to pass the storyID from the headlines on the index.asp to story.asp? Is there other/easier ways to this? I want to be clear in the direction I'm heading.
I am pulling info from a recordset and all the information is correct as I have tested it in Analyzer. The recordset returns info inside a table. From that table, I select a few options then submit the form. During the submit it passes 6 parameter. Up to this point, everything is correct. My problem is that my last parameter is passing the ID and not the Manufacturer Name. Code:
Does anyone know how you would pass a variable back to the classic side from the ASP.net side? I pass a variable to .net, but for the life of me I cant seem to figure out the way to reverse it from .net to classic. Below shows where my variables are stored on the .net side from classic ASP.
Code:
Dim BgDate = Request.Form.GetValues("BeginDate")(0) Session("BeginDate") = BgDate Dim EdDate = Request.Form.GetValues("EndDate")(0) Session("EndDate") = EdDate
I am attempting to pass null as the input value from a series of textboxes if the user does not input a value prior to submit. To try and do this, I am using a vbscript function on this asp as follows:
I was hoping this would convert those emptystring textboxes to null.
Then, these variables are input in an update stored procedure called from the same asp upon submit. This handles ntext and like fields in the table I am updating, but a null value passed in this way for a numeric field chokes. The error on the asp is something like, "unable to convert value of type text to numeric". Can't null be passed as a parameter value when the field type is numeric?
How does one pass null for a parameter's value in a stored procedure on an asp? Am I missing something here?
I have a form that you enter in a file path i.e c:folder1 you then click search and the application will search for that folder and check if it exists if so it will return a list of files in that folder. you are alowed to select what files you want to copie and then enter in the folder you want to copie them to.
here is my issues: i enter in my folder to search on and it is good I get a list of files in that folder I am also given the the folder path at the top of my table. in the code I have also created a hidden field so that when I click on my copy button my from folder path is sent over to that I can us it in my objFile.CopyFile.
NOW Here is where I go *WTF* at the top of my page I am printing out my folder path vartiable and it is right. however once i press that copy button the folder name gets cut off at the space i.e E:flkfkdlsdkklfile2 inforil....
so how do I fix this here is my code I have tryed to highlight the partst pertaing to this issue. Code:
Im trying to pass the 'month' variable which is a session variable from one page to another. It manage to appear on the other page in a textbox but when I try to pass it to the recordset, it fails. Can I know why?? This is the page which I'm passing the variable to. Code:
im trying to learn how to pass a variable taken from a database and write it into an xsl stylesheet. And ive found some info regarding this but its too advanced for me to understand. Could anyone explain it to me in newbie terms?
What I have is an ASP page that starts off with multiple ways to access a project list and other pages via mysql queries. One of those is a button with the following
From this button I'm wanting to pass a variable to acknowledge that it is ONLY wanting ACTIVE projects and also what was originally already there which is the MySort for sorting by different columns. The next page has the following I cut out some irrelevant stuff. Code:
I have a session variable 'Status' that I created in page1.asp in my website. After creating this session variable, page1.asp will redirect to page2.asp and will display 'Status' value. This works in both IE and Netscape.
A problem starts when a page (redirect.php) from another website (which belongs to a client) tries to call page1.asp. Using IE, page1.asp can't pass 'Status' value to page2.asp. However, in Netscape, page2.asp can display 'Status' value.
I don't think my code in page1.asp is wrong because it works if I type in the url to page1.asp directly in IE. The client's website runs on Linux. Anyone know if this is the cause for this problem? Anybody know how to solve this problem?
I have an ASP site and an PHP site.I would like to pass a variable 'loginname'from the ASP page to my PHP application in the form of a link,eg.:
mysite.com/index.php?username=myname
'myname' is a Global variable / Session.
Can anyone tell me if it is possible to make a simple encryption for the 'myname' variable so I can pass this variable to PHP without people knowing the username?
Example: 1. ASP will encrypt the username into 'sfh234gge' 2. link will be mysite.com/index.php?username=sfh234gge 3. PHP will decrypt the username again into 'myname'