?
Solved

Cannot retrieve value from a webpage

Posted on 2011-09-24
14
Medium Priority
?
228 Views
Last Modified: 2012-05-12
We have a aspx page which writes a value to a textbox in two webhosts, Ix and godaddy...
When trying to retrieve the value from a VB6 code, it works fine with Ix but gives an error (object doesn't support this property or method) in godaddy.

The vb code uses where Autoreg is the Input
WebBrowser1.Document.Form1.AutoReg.Value

The link to the exe which retrieves the value is in the below link

http://www.megaupload.com/?d=L7WAP04W

In the exe command 1 button is for ixwebhosting and command 2 is for godaddy

Can anyone tell what is the difference in two hosts?
0
Comment
Question by:winman_soft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
14 Comments
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 36592030
It seems to be a problem in your exe, maybe godaddy is sending you extra HTTP headers that you need process or something.
0
 

Author Comment

by:winman_soft
ID: 36592417
@sudaraka
http://www.megaupload.com/?d=NVEYQRXL

I have uploaded my source codes here
0
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 36592540
HTML form on http://saralsolutions.com/test2/sarl_sol.aspx doesn't have a name attribute. that might be throwing off your object reference WebBrowser1.Document.Form1.AutoReg.Value.
0
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 

Author Comment

by:winman_soft
ID: 36597154
But it is working in Ixwebhost
0
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 36598014
http://saralsolutions.com/test2/sarl_sol.aspx
<form method="post" action="sarl_sol.aspx" id="form1">

Open in new window

Change it to:
<form method="post" action="sarl_sol.aspx" id="form1" name="Form1">

Open in new window


On http://trueirr.com/test/Test2/sarl_sol.aspx it had the name parameter on the form, but I can access it now, I guess you took it down, np, try the name parameter.
0
 

Author Comment

by:winman_soft
ID: 36715192
Even though I upload aspx with name attribute for the form.. It wont be shown in the source..
Can u tell me why this is happening?
0
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 36715758
Is this a server side form? Although I didn't see runat="server" on them.
AFAIK ASP.Net alters the id and name of the server side forms, maybe that has something to do with this.

Try using a regular .html file instead of .aspx to see if that is the case.
0
 

Author Comment

by:winman_soft
ID: 36715932
yes, it is a server side form.. I have specified runat="server" .. How can I pervent it from changing(only name is missing, id attribute is shown)?
Server is using IIS 7.5(Windows Server 2008)
0
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 36716008
I'm not sure if this is supported on VB control, but you can try to skip the form and access the element using following method:
WebBrowser1.Document.All("AutoReg").Value

Open in new window


P.S:
I'm advising you only with my former VB experience, you might want to get some .Net experienced eyes on this be using the "Request Attention" link.
0
 

Author Comment

by:winman_soft
ID: 36716081
thank u for the reply.. and it works!
But the problem is our product already has the old code, and it is a tedious and tough process to replace this in all our customer places.
So, it is essential to make the old code work in the new web host.
Is there a way that can be done?
0
 
LVL 18

Accepted Solution

by:
Sudaraka Wijesinghe earned 2000 total points
ID: 36717609
It could be due to the difference in the .Net framework versions the web hosts use.
http://saralsolutions.com has version 4 and the other seem to have an earlier version. Check on your hosting configuration if you can switch to the .Net framework version your app worked with, you might need to get the assistance of the hosting service for this.
0
 

Author Comment

by:winman_soft
ID: 36891073
Thank you for your assistance sudaraka..
Yes It was because the support for name attribute of form was removed in asp.net 4.0.
It worked when I changed the .net version to 2.0

Regards
0
 

Author Closing Comment

by:winman_soft
ID: 36891079
ASP.NET Version 4 does not support name Attribute
0
 
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 36891620
Glad to help, I learned some thing from it too. Thanks for the points.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question