Autor Beitrag
nabralanca
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Sa 31.01.09 17:31 
hallo ich bin hier noch ziemlich neu, und hab auch noch nicht soviel mit c# gemacht, was das internet betrifft.

ich habe vor ein kleines Programm zu schriebn, das daten von einer Internet seite einließt, diese dann bearbeitet und schließlich neue daten auf der webseite wieder einzugeben, bzw auf links oder buttons zu klicken.

die ganze Logik schaff ich selber, nur meine Frage ist, wie krieg ich mein programm dazu dtaen aus dem Internet einzulesen, dass sie nachher als variable rauskommen??
und wie kann ich dem programm sagen das es auch wieder daten auf iner bestimmten webseite ausgibt???

gibts da irgenwelche gute tutorials???

danke
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 31.01.09 18:20 
Hallo und :welcome: im Forum!

Hier auf dieser Seite gab es diese Frage schon einmal, da stehen einige Antworten:
www.csharpfriends.co...st.aspx?PostID=41764
Unter anderem das:
Zitat:
ausblenden C#-Quelltext
1:
webBrowser1.Document.GetElementById("Submit").InvokeMember("click");					
nabralanca Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Sa 31.01.09 18:33 
danke

funktioniert aber irgendwie net

habe das ganze in einer windows forms anwendung gemacht, soll ich eine andre vorlage nehmen??

oder was für usings brauch ich zusätzlich, und welchen code??

und wo sag ich ihm von welcher webseite überhaupt
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Sa 31.01.09 20:21 
Schau mal hier:
Suche bei Google C# WEBBROWSER

Da findest du jede Menge Links zu diesem Control und dessen Verwendung in C#.
nabralanca Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: So 01.02.09 11:34 
bei den meisten webseiten gehts, nur bei php seiten hab ich probleme, wie kann ich die einlesen???
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 01.02.09 15:46 
Eigentlich sollte das keinen Unterschied machen. Was passiert dort denn? Gibt es eine Fehlermeldung? Passiert nix? Das Webbrowser Control kannst du ja sehen, insofern siehst du ja was bei Navigate dort passiert.

Ich selbst habe das kaum unter C# verwendet, aber unter Delphi gab es in der Richtung keine Probleme.
nabralanca Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: So 01.02.09 17:30 
wenn ich zum beispiel den code von ner normalen seite eingegeben hab, ist alles gelaufen, und auch die links von der seite konnte ich aufrufen, so wie ich es mir vorgestellt habe

bei einer php seite, für die ich das programm brauche, kann man links nicht benutzen, es wird lediglich die url angezeigt
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 01.02.09 17:38 
Hast du eine Adresse einer Seite wo das nicht geht (zum Ausprobieren)?

Und du rufst einfach nur Navigate auf?
nabralanca Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: So 01.02.09 17:48 
ne bis jetzt hab ich des so gemacht:
ich hab den quellcode von irgendeiner seite in einte textbox kopiert und die dann im webbrowser asugeben lassen.

soll ichs anders machen
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 01.02.09 18:10 
Ja wozu machst du das denn? :shock:
Ruf doch einfach Navigate mit der Adresse auf, dann wird die Seite direkt im Webbrowser Control geladen.
nabralanca Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: So 01.02.09 18:31 
thx jetzt gehts^^

und wie sag ich ihm jetzt das er etwas in eine textbox schreiben soll???
nabralanca Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19



BeitragVerfasst: Di 03.02.09 17:19 
hab es jetzt mit winapi versucht

das geht aber irgendwie nicht
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19272
Erhaltene Danke: 1740

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 03.02.09 18:13 
Was hat das mit der Windows API zu tun? ;-)

Hier findest du die Dokumentation:
msdn.microsoft.com/d....getelementbyid.aspx

Und hier findest du die zu dem Element, das du zurückbekommst:
msdn.microsoft.com/d...rms.htmlelement.aspx