I am trying to create a user administration section and I want to use a subroutine that connects to a database, runs a query, returns a result and then closes the database connection. Then I would like to be able to access this result e.g a COUNT of fields in a table, in other pages.
Is this possible using Subroutines, if so how, and what other ways do you guys use code reuse in ASP?
So, when my search returns the result I need one of the fields to be clickable and show the customer's info for the clicked customer.So, lets say we make the ID clickable. So, my HTML has to look like:Code:
<input type = "submit" value="sqlrs("ID")">
How do I construct that in ASP since, using " in strings ends it and same with Response.write methods.
I am creating student website and wants to create some featuer like if user come on my side and type his/her student id in provided SEARCH FIELD [TEXT BOX] that page will display perticular information of that user but before that it will ask for login name and password as well. I am making my website in XHTML [front end], JAVA SCRIPT[validation], ASP [server coding], IIS server.
How do I write the code for a button that will call a function/procedure in ASP and delete all records in an array? Should I use a function or procedure? Anyone who would like to finish this code? Code:
I want to have a list of links on my ASP page that call specific info from different subs on the page into a <div>. So I'd have a menu-like list on the left, say:
LINK 1 LINK 2 LINK 3
so LINK 1 would call and display the info from the sub called, say, "link1", and LINK 2 would call and display info from the sub "link2", etc.
then on the right would be the <div> to contain the requested info from the sub.
Any suggestions? I've trawled the net for answers but when you don't really get the terminoligy, etc, its very hard to know what you're looking for!
is it possible to call ASP subs, files, functions, etc. from Javascript commands? I want to have a setup of various buttons where clicking on a button would call an ASP sub to grab info from a db.
i am having a problem with ASP not doing the requestion action of Response.Write based on conditions of a code entered on a first page. The codes are below. I made the second page from template of another that yall helped me with and it aint working.. Code:
Was curious if someone could help me out. I'm setting up a website and using Server side includes to make it easier for maintaining. I've got a contact form that will be included on several pages and I need to know from what page the forms is getting posted from. If I can figure out how to pass one value to a hidden field I can use the form as an include instead of hard coding the whole form into each page.
Ideally the value to be passed could be coded into each page then asp could pick it up and insert it into the hidden field. Any one point me in the right direction for accomplishing this. I don't have a clue about asp other than the basic include statement.
May i know isit can use asp to send an automail when customer fill up the registration form. i need to send a automail to his email verify the customer details. is it any free source code to write?
Since ASP server scripts use VBScript by default, does it mean it is redundant to put the following in ASP page? Then when do we need to use this? In client-side VBScript?
I want to be able to write a gif in my ASP app. Not even sure if it is possible with response.write. I want to replace the 'Member Log In' text with XXX.gif, and still have it linked to login.asp....
I am trying to retrieve info from database and display it in the form. The problem I having is when I try to change the info in the form, it is not changing and I don't know why. table.fieldname = payroll
Code:
payroll = rs("payroll") If payroll = "something" Then payroll = "Some Payroll" End If
In the form table: <input type="text" name="payroll" value=<%response.write(payroll)%>>
I want "Some Payroll" to be displayed in the form instead of "Something".
<% username = Session("username") if ("" = username) Then Response.redirect "login.asp" response.Write("Sorry, you are not logged in.") response.End End if %>
How do i write that Sorry, you are not logged in ... to the login.asp?
I've tried using a FSO to write to it directly. I've even managed to write a script for windows scripting host and invoke it from ASP, using standard output redirection (">") to redirect output to a file with no problems.
However, I can't seem to send writes to LPT2: from ASP, even through the other script.
It works perfectly fine if I invoke the WSH script at a command prompt using precisely the same command line, but when I do it from inside an ASP page, I get nothing.
Are there some permissions for the port I have to set or some such? I honestly have no idea how to get it to work.
If it is relevant, LPT2: is a mapped port for a network printer.
Yes, this is related to my previous thread, but I'm down to a much, much more specific problem.
I am trying to check for the final sql statement before passing it to a database. I want to build the statement using user input in three text boxes. However, the sql statement does not give me the right statement. Instead it gives the following message: Error Type: Request object, ASP 0102 (0x80004005) The function expects a string as input. /sailors/loginverification1.asp, line 14 CODE: <% strSQL = "select PeopleNameFirst, PeopleNameLast, PeopleClubCode from People where " & _ "PeopleNameFirst ='" & Request.Form(txtFirstName) & "' AND " & _ "PeopleNameLat ='" & Request.Form(txtLastName) & "' AND " & _ "PeopleClubCode ='" & Request.Form(txtPassword) & "'" Response.Write strSQL %>
Does any one know how I can position the output at certain point? Such as If I want to print "hello" starting at position 50 from the left in the file.
I am creating html string in a component that transforms xml into html. Works o.k. with small html strings, but takes forever to response.write big html strings. Is it possible to speed it up?