|
Hi Phil,
Sorry Fiddler is a no go. It does not write data to a file.
Thanks,
Antone
|
|
|
|
|
How about if you use the WebBrowser Control on a windows form? Im not sure but it think you should beable to browse to the page you want and then write some code to get the HTML of the current page on the WebBrowser control.
If that doesnt work then you can look at using Automating IE directly i forget the dll name its something like SHDocVW and this contains the Interfaces for automating IE Directly.
From here you can get the current document.
|
|
|
|
|
Thanks for the input, but I do not believe I have the knowledge to do that. I was hoping that this has been done before. The IE automation sounds interesting.
Thanks,
Antone
|
|
|
|
|
If you want it learn its Called Platform Invoke in .NET its all about using the existing Windows dll's from .NET
here is a good artical to get started its shows you how to use some of the functions in the User32.dll
[PInoke on CodeProject]
this website list alot of the windows functions with code to automate them
http://www.pinvoke.net/[www.pinvoke.net]
Phil
|
|
|
|
|
Hi Phil,
Thanks for all your assistnce. I really though this would have been done in the past. I will take a look at all the info you sent to me.
Still waiting to hear back from the Perl guys, I really thought you can do this in Perl.
Thanks,
Antone
|
|
|
|
|
It is possible to get the HTML From a WebBrowser Control see below code sorry if you dont know C#
I just put a textbox on the page to enter the url, a button to navigate to the url(btnLoadWebsite_Click handles this button) and a button to get the HTML from the currently displayed page (btnGetHTML_Click handles this).
private void btnLoadWebsite_Click(object sender, EventArgs e)
{
try
{
Uri oURL = new Uri(txtURL.Text);
wbMain.Navigate(oURL);
}
catch (Exception err)
{
MessageBox.Show(err.ToString());
}
}
private void btnGetHtml_Click(object sender, EventArgs e)
{
MessageBox.Show(wbMain.DocumentText);
}
The important bit is wbMain.DocumentText. wbMain is the WebBrowser Control and DocumentText is the property that holds the current html page text.
Phil
|
|
|
|
|
I want to call an window from an ASP Web Page by clicking an ASP:Button
and the code will be run at both server and client side.
Can anybody guide me please?
|
|
|
|
|
Member 4056066 wrote: I want to call an window from an ASP Web Page by clicking an ASP:Button
What kind of window?
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
just another asp page in the window
modified on Wednesday, July 8, 2009 9:30 AM
|
|
|
|
|
What you need is this[^]
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Yees !
I found some very good way.
and thanks for the search link
|
|
|
|
|
Hi friends,
Its very silly problem. But still it scares me.
int _Totalcnt = 62;
int _Namecnt = 31;
decimal Pctmatch = Convert.ToDecimal((_Namecnt / _Totalcnt) * 100);
I am getting value for Pctmatch as '0'. why it showing wrong. How can i get exact decimal value there?
G. Satish
|
|
|
|
|
Convert _Namecnt and _Totalcnt to decimals rather than the result of the calculation, i.e.
decimal Pctmatch = (Convert.ToDecimal(_Namecnt) / Convert.ToDecimal(_Totalcnt)) * 100;
|
|
|
|
|
|
Do not spam
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Shivass wrote: www.spiritssoft.com
Please Don't SPAM. This is second time you are doing the same thing.
|
|
|
|
|
you are a retard
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
ya, perfect. Its working now. But how to take precesion here.
i am getting value for Pctmatch = 76.876789989999
how can i get only 2 values after decimal?
G. Satish
|
|
|
|
|
ya, i got the answer. By converting to string as
Pctmatch.ToString("N2");
G. Satish
|
|
|
|
|
int _Totalcnt = 62;
int _Namecnt = 31;
decimal Pctmatch = Convert.ToDecimal((Convert.ToDecimal(_Namecnt) / Convert.ToDecimal(_Totalcnt)) * 100);
|
|
|
|
|
Use Decimal directly instead of making your _Totalcnt and _Namecnt as int why taking up memory by converting them to decimal later when you can mark them decimal in first place.
|
|
|
|
|
I can't believe you got this many replies and not the right answer, or at least, not a proper explanation ( that I could see ).
decimal PctMatch = _Namecnt/(Decimal)_Totalcnt * 100
If you divide by a decimal, you will get a decimal answer. If you divide by an int, it gets rounded and you get an int, which is THEN converted to decimal, but the decimal part has already been discarded.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thank you christian for your detailed explaination.
G. Satish
|
|
|
|
|
|