Click here to Skip to main content
16,020,305 members

Comments by e.v.r (Top 34 by date)

e.v.r 19-May-13 14:43pm View    
thanks,
no, i need to know inputs are which form.
can u writ code for me? my code is here:

HtmlNodeCollection forms = doc.DocumentNode.SelectNodes("//form");
if (forms != null && forms.Count > 0)
{
FormMethod = forms[0].GetAttributeValue("method", "POST").ToUpper();
HtmlNodeCollection inputs = doc.DocumentNode.SelectNodes("//input");
foreach (HtmlNode input in inputs)
{
string TypeName = "";
if (input.Attributes.Contains("type"))
TypeName = input.Attributes["type"].Value.ToString();


if (
string.Compare(TypeName, "button", true) != 0 &&
string.Compare(TypeName, "image", true) != 0

)
{
try
{
InputsControls += input.Attributes["name"].Value.ToString() + "\r";
}
catch (Exception)
{
}
}
}
}
e.v.r 13-May-13 6:30am View    
Thank you!
i use inner html but my application didn't work.
how can i use this?
e.v.r 8-May-13 3:07am View    
My code can not run to my application.
e.v.r 7-May-13 1:16am View    
my code is here.

public partial class Form1 : Form
{
int start = 0;
int indexOfSearchText = 0;

public int FindText(string txtToSearch, int searchStart, int searchEnd)
{

if (searchStart > 0 && searchEnd > 0 && indexOfSearchText >= 0)
{
XSSResponceRichTextBox.Undo();
}

int retVal = -1;

if (searchStart >= 0 && indexOfSearchText >= 0)
{

if (searchEnd > searchStart || searchEnd == -1)
{

indexOfSearchText = XSSResponceRichTextBox.Find(txtToSearch, searchStart, searchEnd, RichTextBoxFinds.None);

if (indexOfSearchText != -1)
{
retVal = indexOfSearchText;
}

// if (indexOfSearchText == -1)
else
{
searchStart = 0;
indexOfSearchText = XSSResponceRichTextBox.Find(txtToSearch, searchStart, searchEnd, RichTextBoxFinds.None);
retVal = indexOfSearchText;
}

//if (indexOfSearchText == -1)
//{
// searchStart = 0;
// indexOfSearchText =XSSResponceRichTextBox.Find(txtToSearch, searchStart, searchEnd, System.Windows.Forms.RichTextBoxFinds.None);
// retVal = indexOfSearchText;
//}
}
}

return retVal;
}

public Form1()
{
InitializeComponent();
}

private void txtSearch_TextChanged(object sender, EventArgs e)
{
if (start != 0)
{
XSSResponceRichTextBox.Undo();
start = 0;
indexOfSearchText = 0;
}
}



private void txtSearch_KeyPress(object sender, KeyPressEventArgs e)
{
int startindex = 0;

if (e.KeyChar == ">
e.v.r 7-May-13 1:14am View    
Thank you!
no, my program is application that work in network, and crawl in html code and find links. so i have request / response we page. now my response is in rich text box. now i want saerch any word for example ( html, ).
i want a search like search in notepad.