c# - How to call a Web Page an automatically fill up a Form passing a String -


i use asp.net 4 c sharp.

i populate input text form string sent user.

the destination page is: http://www.maxmind.com/app/locate_demo_ip

note: im not developer target page.

here ho should work:

when visitor site click link (ip address) sent to: http://www.maxmind.com/app/locate_demo_ip , textbox automatically populates value (ip address user has clicked).

the user manually click button "look ip addresses" in maxmind.com have result.

any idea how it? maybe sample of code? guys usual great support! :-)

if can, generate link form :

http://www.maxmind.com/app/locate_demo_ip?ip=xx.xx.xx.xx

then, page can access value using txt1.text = page.request.querystring["ip"]

[edit] assumes developer of target page... ?

you tells me not developper.

either maxmind provide url syntax similar 1 below (check if there api section, or have inject javascript value. in case, have know :

  • for security reason, avoid cross site scripting attack, can't pilot external site 1 page other. can maybe add application in trusted zone of client computer, it's not possible in internet application
  • nothing guaranties html structure of maxmind won't change in future. can't rely on this.

an approach "proxy" features of maxmin calling server application target page, http post request. can parse results use on application. again, limitations consider :

  • maxmind may disallow such calls. may want user use application
  • again, target page may change structure , textbox names
  • parsing result can give headache... , output structure may change (again)
  • you have handle ui related feature.

a final though : goal ? maybe there other ways achieve it.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -