Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > <img> tag ASP script execution

Reply
Thread Tools

<img> tag ASP script execution

 
 
Mike Kanski
Guest
Posts: n/a
 
      09-15-2003
I have an asp page that contains a simple insert statement and redirect
i.e.:

Page1.asp
<%oconn.execute "insert into table 1 values(1)"
response.redirect "newpage.asp"
%>

I have to add some code to it to not allow execution of this script if the
page was called from the <img> tag i.e..

<img src=http://webname.com/page1.asp width=1 height=1>

The page should be opened in browser in order for the script it contains to
be executed. How do i acomplish that?


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      09-15-2003
I think I can understand why you want to do this, but it seems that the only
way you can do this is:

1. Force the user to confirm the page or require some other user
interaction.
2. Don't have a page that inserts data just by loading.

Ray at work

"Mike Kanski" <(E-Mail Removed)> wrote in message
news:%23%(E-Mail Removed)...
> I have an asp page that contains a simple insert statement and redirect
> i.e.:
>
> Page1.asp
> <%oconn.execute "insert into table 1 values(1)"
> response.redirect "newpage.asp"
> %>
>
> I have to add some code to it to not allow execution of this script if the
> page was called from the <img> tag i.e..
>
> <img src=http://webname.com/page1.asp width=1 height=1>
>
> The page should be opened in browser in order for the script it contains

to
> be executed. How do i acomplish that?
>
>



 
Reply With Quote
 
 
 
 
Dave Anderson
Guest
Posts: n/a
 
      09-15-2003
"Mike Kanski" wrote:
>
> I have to add some code to it to not allow execution of this script if the
> page was called from the <img> tag i.e..
>
> <img src=http://webname.com/page1.asp width=1 height=1>
>
> The page should be opened in browser in order for the script it contains

to
> be executed. How do i acomplish that?


As far as IIS is concerned, a request is a request -- how the browser
chooses to dispose of the Response is immaterial. You can test this by
collecting the contents of the Request.ServerVariables collection and
storing them in a DB, then comparing the differences.

If the <IMG> only resides on a single script, then you might have a shot at
dealing with it by examining HTTP_REFERER.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Block execution of script while same script is already running MrBanabas@googlemail.com Ruby 2 12-17-2008 06:03 PM
Get cgi script to begin execution of another script... sophie_newbie Python 1 03-13-2008 02:52 PM
private data stashed in local/global execution context of PyEval_EvalCode disappears down the execution stack sndive@gmail.com Python 9 11-14-2007 10:31 PM
script functions in <script> tag kal Javascript 3 08-06-2007 10:52 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM



Advertisments