Click here to Skip to main content
15,914,351 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Is this a bug, or what? Pin
xaphod18-Jan-06 12:55
xaphod18-Jan-06 12:55 
GeneralRe: Is this a bug, or what? Pin
mysorian18-Jan-06 17:04
professionalmysorian18-Jan-06 17:04 
GeneralRe: Is this a bug, or what? Pin
xaphod19-Jan-06 10:41
xaphod19-Jan-06 10:41 
GeneralRe: Is this a bug, or what? Pin
mysorian19-Jan-06 12:00
professionalmysorian19-Jan-06 12:00 
QuestionLast Modified At... Pin
sujith3117-Jan-06 17:42
sujith3117-Jan-06 17:42 
AnswerRe: Last Modified At... Pin
D. Ram Prabhu17-Jan-06 18:31
D. Ram Prabhu17-Jan-06 18:31 
QuestionNewbie asp question Pin
TAlvord17-Jan-06 11:51
TAlvord17-Jan-06 11:51 
AnswerRe: Newbie asp question Pin
Guffa17-Jan-06 12:35
Guffa17-Jan-06 12:35 
You are mixing server side code with client side code.

Consider these two rules:

1. The server side code and the client side code never exist in the same place.
2. The server side code and the client side code never exist at the same time.

The code on the server side is connecting to the database, getting the data and putting the data in the code that will become the html table. Then the recordset is closed (only you forgot to do this), and the connection is closed. After that, the page is sent to the browser.

In the browser, when you click a button, all it does is to put a value in a variable that is called strQuery. It uses the variables TableName1 or TableName2, but they are empty. You had variables with the same names in the server code, but those variables are long gone, and they existed in a completely different place.

Once the strQuery variable has gotten a value, nothing happens. You don't have a database connection or a recordset, and there is no code that does anything at all with the value in the strQuery variable.

To get a look at what's going on, once the page loads in the browser, use the View Source command to look at the page code that the server code has created. You will see your two subroutines, the two buttons, and a table with text in it. That's all that you have at that point.

If you want the contents of the table to change, you have to reload the page so that the server code is executed to create a new page. You have to send something to the server so that the server code can determine what choise you have made. One way is to simply make the buttons into submit buttons, then you can use Request.Form to check which one of the buttons wass pressed.

---
b { font-weight: normal; }

AnswerRe: Newbie asp question Pin
D. Ram Prabhu17-Jan-06 18:01
D. Ram Prabhu17-Jan-06 18:01 
Questionwhois database?? Pin
Small Rat17-Jan-06 8:48
Small Rat17-Jan-06 8:48 
QuestionVar from Cookie into a SQL query in ASPX Pin
evlxtc17-Jan-06 6:20
evlxtc17-Jan-06 6:20 
QuestionVBScript: in dialog windows box woes... :S Pin
kevingpo17-Jan-06 5:24
kevingpo17-Jan-06 5:24 
QuestionJavascript error callee on popup window Pin
stephmiddleton17-Jan-06 2:41
stephmiddleton17-Jan-06 2:41 
QuestionProblem in sending email using ASP Pin
Anaha17-Jan-06 0:59
Anaha17-Jan-06 0:59 
QuestionOrganised Directory Structure Pin
Brendan Vogt17-Jan-06 0:51
Brendan Vogt17-Jan-06 0:51 
Questionmethods used for implementing SPAM filter Pin
chippu16-Jan-06 17:51
chippu16-Jan-06 17:51 
AnswerRe: methods used for implementing SPAM filter Pin
Curtis Schlak.16-Jan-06 20:16
Curtis Schlak.16-Jan-06 20:16 
QuestionOpen IE if system idle for 5 minutes Pin
maneeshbakshi16-Jan-06 11:52
maneeshbakshi16-Jan-06 11:52 
QuestionI want to stop Marque effect on mouse move? Pin
vikas amin16-Jan-06 2:39
vikas amin16-Jan-06 2:39 
QuestionTo access client's directories through web application... Pin
Manjeet Singh0216-Jan-06 1:58
Manjeet Singh0216-Jan-06 1:58 
AnswerRe: To access client's directories through web application... Pin
Guffa16-Jan-06 2:18
Guffa16-Jan-06 2:18 
QuestionHow would you store a zip code in a database? Pin
MY120116-Jan-06 1:51
MY120116-Jan-06 1:51 
AnswerRe: How would you store a zip code in a database? Pin
Guffa16-Jan-06 2:25
Guffa16-Jan-06 2:25 
QuestionVisual Interdev problem. Pin
Prakash Nadar15-Jan-06 19:56
Prakash Nadar15-Jan-06 19:56 
AnswerRe: Visual Interdev problem. Pin
Prakash Nadar17-Jan-06 1:07
Prakash Nadar17-Jan-06 1:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.