|
Hey everybody!
I created a crawler using a WebBrowser object. it works really great but a few not-so-small problems.
I'm crawling using Document_complete event to get the body of the page, and I'm extracting the links using Document.Links property.
The problem is that When sometimes the crawler crawls to files (mp3, pdf etc.) and it executes them (which, of course, is NOT what I want). besides that it prompts (like in IE) when it navigates into password-needed sites and secured (encrypted) pages.
I've tried to remove these pop-ups and files execution, but I without any success. I just can't find a way to disable these "features" of the WebBrowser (so it won't act as IE, but simply making requests and extracting links without using regular expressions).
Help anyone?!
People, your my only hope!
Thanks A LOT in advance!
|
|
|
|
|
You may want to consider using this[^] instead of a WebBrowser control to crawl and extract info from HTML pages. And if you want an MFC version, see this[^] article.
/ravi
|
|
|
|
|
Hello everyone,
I have a DataGrid which is populated by data from the Database server. The following codes shows this.
<br />
OdbcAd = new System.Data.Odbc.OdbcDataAdapter("SELECT * FROM " + SelectedTableName + ";", OdbcCon);<br />
<br />
DataSet myds = new DataSet();<br />
<br />
OdbcAd.Fill(myds, SelectedTableName);<br />
<br />
dataGridView1.DataSource = myds.Tables[SelectedTableName];
I was wondering if it is possible to run queries on the DataGrid's data similar to the one that can be run on the data stored in database server?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
In my aspect,
data grid is only for displaying data as in tabular format, not to query information
evil
|
|
|
|
|
Hi,
You would actually run your "query" on the DataSet. By that I mean you can filter and sort it.
Here is an example:
http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/FilterData.aspx
Reply back if you have more questions!
Justin
|
|
|
|
|
My understanding say that you can't query dataset, but what best you can do is to filter the dataset - datatable to fect the required information and bind it again.
|
|
|
|
|
Try DataTable.Select(string filterExpression9 of the underlying datasource ( in your case: SelectedTable ) and hide the rows in your datagridview which are not in the result set returned by this method. What I would do is, not to modify original datasource which is "SelectedTableName", but execute SelectedTable.Select(....) and store the result in thze Tag value of the DataGrid which is a object value. Then set the datasource to this result set. Afterwards, if you want to see the original(non-filtered) rows, you won't need to retrieve them from the data store again. Hope this helps.
|
|
|
|
|
hi i would like to know if there is a function that can be writen that will execute after the content of the instance is changed in window applciation in c#.net
|
|
|
|
|
|
Hi,
You have to implement observer pattern here I guess...
Regards ,
Nishu
|
|
|
|
|
do you have a sample or can you direct me to a article discribing it pls?
|
|
|
|
|
|
just add an event of Eventhandler<t> which can be found in .Framework 2.0. You can create a structure or class for the T parameter, it is generic as you see. Then, when you create you instance of tzhe object, add an event handler to your Eventhandler<t> event, that's all. You can fire the events in your properties "set accessor" forexample. Hope this helps.
|
|
|
|
|
Hello everyone,
I have a Windows Application which I would like to use a section for displaying information. I am thinking of make it some how it looks like the CNN News Banner which moves from Right 2 Left.
I was wondering is this is possible and it is can someone be kind enough to give me some information on how to get this done?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
what are the uses of outerxml
and also how to use....
|
|
|
|
|
Hamsika rani wrote: what are the uses of outerxml
and also how to use....
I'm not sure what all the uses of OuterXml are but you could use four periods in a paragraph that had four sentences. Does that help?
led mike
|
|
|
|
|
Hamsika rani wrote: what are the uses of outerxml
Return the XML markup that represents the current node and all its child nodes.
Hamsika rani wrote: and also how to use
Well, get an XmlNode instance and access the OuterXml property.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I want to preview html code in my windows form app using the web browser control, without saving the document. I just want to somehow capture the text/code in the textbox, and display it in the browser control.
Anyone know how can I make this happen?
|
|
|
|
|
Set the control's DocumentText property.
/ravi
|
|
|
|
|
Thank you for your reply. However, I'm not sure how to set the control's Document.Text property. Could you offer some guidance?
Thank you.
|
|
|
|
|
WebBrowser _wb = new WebBrowser();
_wb.DocumentText = "<html>Hello, <b>HTML</b>!"; /ravi
|
|
|
|
|
hi ,
How can i use in a DataGrid Cell Only Number , Iuse yhis function for this :
public bool OnlyIsNumeric(string val)
{
try{
int result = 0;
return int.TryParse(val, System.Globalization.NumberStyles.Integer, System.Globalization.NumberFormatInfo.CurrentInfo, out result);
}
catch{ return false;}
}
but Ican not use this in datagrid in DataGrid1_CurrentCellChanged Event :
DataGrid1[DataGrid1.CurrentRowIndex, 2] = "";
thanx
s_mostafa_h
|
|
|
|
|
Hi Mostafa,
Please use this code:
private void dgview_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
dgview.EditingControl.KeyPress += new KeyPressEventHandler(dgviewKeyPress);
}
private void dgviewKeyPress(object sender, KeyPressEventArgs args)
{
if (!char.IsDigit(args.KeyChar))
args.Handled = true;
}
Please let me know if this helps.
Thanks,
Gopal.S
|
|
|
|
|
thanks a lot for ur reply , but If I want to this (only number ) Only in Column 2 ( one of my field is numeric for e.g. SerialNumber ),
in this case How can i do this .
By the way I have DataGrid , Not DataGridView .then this object has not the properties that u wrote .
thanks again
-- modified at 6:58 Monday 7th May, 2007
s_mostafa_h
|
|
|
|