Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble hunting down method

Status
Not open for further replies.

imarosel

Technical User
Jun 23, 2005
149
US
I've inherited some ASP code from a person long gone. I'm reading through it now, trying to wrap my head around things. I've found something I just can't figure out. I've ran accross the following line of code.

<td class="txt_75_C_T3B3L10"><a href="Admin.asp?Method=TestFiles">Update Test Files</a></td>

I don't know how he made a method called test files. I would guess this is a custom method. I know next to nothing about methods. If the person before me made their own method would it be in Java or VB? Any hints on where to dig it up. I've searched the entire drive for the word TestFiles, all I can come up with is an asp page called TestFiles, but it is in a different folder than the page I found the above code in, the path to this other folder is nowhere on the ASP page the above code was found in. I know nobody out there knows our file structure, but a small hint on how someone would make their own method might help.
 
You are thinking too hard!

That is just a value passed in the QueryString ...

That is NOT a custom extension of the HTTP protocol.

Admin.asp?Method=TestFiles

This could also be: Admin.asp?Operation=TestFiles

Or if there were three values in the Querystring:
Admin.asp?Method=TestFiles&Why=JustBecause&When=DoItNow

 
Hi imarosel

Unless I'm way off the mark, your Method=TestFiles looks to me like a simple parameter name-value pair, where the page "admin.asp" is called and requested to display only those records where a field called Method equals "TestFiles".

So, you need to look at the query/table in the database which underlies the admin.asp page to find a reference to the field called "Method".

Regards

Mac
 
yes i agree TestFiles is simply a string that a variable named Method is assigned to you...

just check in the code...for something like this...

Request.QueryString("Method")

and see what it is being compared to or how it is used...

-DNG
 
I see what you are saying, so it could be donkey=testfiles or elephant=testfiles it's not its own method?
 
No other way round...it could be...


Method=TestFiles or Method=Donkey or Method=Elephant

-DNG
 
Yes, it is more of a variable name.

It is not the same thing as POST and GET which are defined in the HTTP protocol as techniques for sending data to a web server.

Because of their existance in the HTTP protocol, POST and GET are also possible values for the method property of an HTML <form> ... the form can submit data to the web server either as a GET with the form values embedded in the QueryString or as a POST with the form values embedded in the HTTP Request header.

I really hope this clears things up instead of complicating it for you...
 
OK, suppose you have this form:
[tt]
<form action=Admin.asp [highlight]method=get[/highlight]>
<input type=text [highlight]name=method[/highlight]>
<input type=submit>
</form>
[/tt]

OK, so you've got a textbox there named method... so suppose you type "TestFiles" into the text box and mash submit button... the web browser will send an HTTP Request to the web server... the Request will have the GET command asking for a page named Admin.asp?method=TestFiles ... so the form field values are appended to the name of the file.

... By the way, this is the same request the browser would send if you clicked on a link like this:
<a href=Admin.asp?method=TestFiles>Click me</a>


Now suppose your form looked like this instead:
[tt]
<form action=Admin.asp [highlight]method=post[/highlight]>
<input type=text [highlight]name=method[/highlight]>
<input type=submit>
</form>
[/tt]

The only difference is that the form's method propety is post instead of get... but this difference will cause the browser to send the POST command in its Request to the web server. The form values will be inside the message body of the request instead of being appended after the filename.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top