Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2004, 12:51 AM
Authorized User
 
Join Date: Aug 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to track the IP address

I want a mechanism by which after accessing a page for 3 attempts the page should become disabled or back button is disabled on browser in my ASP.NET application.
Also my text boxes r displaying the last few values entered which i do not want. For eg: in security-text textbox it displays the values entered in last few attempts.

Also I want to track the IP address. How can i do it?
Can anyone tell me.


 
Old October 11th, 2004, 10:50 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

For Disabling:
You can create an static variable and increment that variable when page loads and if count is 3 disable all the controls in the page.
For values entered:
   You can diable the viewstate
To get IP Address:
   It will be in the Request Header information.YOu can track IP address using that information



 
Old October 13th, 2004, 03:02 AM
Authorized User
 
Join Date: Aug 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But the thing is that the user can use the Back buton of Browser and can continue which i donot want


 
Old October 14th, 2004, 12:20 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You can avoid users use the back button by redirecting user to the same page.
This you can do with the javascript.Code is below
<script language="javascript">
  if(history.back)
    history.forward();
</script>

 
Old October 20th, 2004, 12:04 AM
Authorized User
 
Join Date: Aug 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Santhi can u tell me the .NET equivalent to this code bcoz history is no command in .net

 
Old October 20th, 2004, 08:45 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

In .NET there is no command for this.U use that javascript..Add that in your .aspx file..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me i must Get IP Address pla_2 C# 2005 2 October 12th, 2006 07:51 AM
IP Address sumanghosh Classic ASP Basics 1 April 7th, 2006 11:24 AM
how to track IP of client's system VinodTewthia Pro JSP 2 December 11th, 2004 12:10 AM
Retreiving IP address & gateway address sjangit VBScript 0 February 3rd, 2004 02:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.