Tuesday, 6 August 2013

How Can i move this function into a Class

How Can i move this function into a Class

public string F03_veri_textbox(string veriadi3) { string Veritext;
Veritext =
webBrowser_sample.Document.GetElementById(veriadi3).GetAttribute("value");
return Veritext;
}



i have a webBrowser_sample object in Form1. I use this function to collect
data from specific webpage. it is working properly. I want to use this
function from a class. But when i try to move it, C# says "The name
'webBrowser_sample' does not exist in the current context". if i define a
new webBrowser_sample in the Class, it will create new webBrowser_sample
object. So i cant use it because i use this function to collect data while
i am surfing this browser. (sorry for my english)

No comments:

Post a Comment