Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 08:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[VB.NET] NullReferenceException

Discussion on [VB.NET] NullReferenceException within the .NET Languages forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
Gameerish___'s Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 1,547
Received Thanks: 796
[VB.NET] NullReferenceException

Hallo,

Ich möchte eine Login für mein Ip Board machen.

Jedoch kommt dieser Fehler :



Was muss ich hier machen ?
Gameerish___ is offline  
Old 11/30/2013, 22:03   #2

 
Syc's Avatar
 
elite*gold: 666
Join Date: Apr 2011
Posts: 5,811
Received Thanks: 2,417
Nicht wirklich viel mit dem Webbrowser element gearbeitet, aber wenn du ein Element mit der ID "submit" ansprichst, solltest du vielleicht vorher schauen, ob es denn ein Element mit der ID "submit" auch gibt ..

btw. webrequests wären hier angebracht
btw.² was wird denn das mit dem Timer1_Tick da unten?
Syc is offline  
Old 11/30/2013, 22:03   #3
 
tolio's Avatar
 
elite*gold: 2932
The Black Market: 169/1/0
Join Date: Oct 2009
Posts: 6,966
Received Thanks: 1,097
nullreferenceexception = das wodrauf du zugreifen willst gibts nicht
tolio is offline  
Old 11/30/2013, 22:19   #4
 
Gameerish___'s Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 1,547
Received Thanks: 796
Quote:
Originally Posted by tolio View Post
nullreferenceexception = das wodrauf du zugreifen willst gibts nicht
"Submit" ist doch richtig.

Gameerish___ is offline  
Old 11/30/2013, 22:59   #5
 
elite*gold: 26
The Black Market: 288/1/0
Join Date: Dec 2010
Posts: 4,343
Received Thanks: 2,395
Nein es gibt kein Element mit der ID "submit"

versuch stattdessen mal
Code:
        Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.All
        For Each element As HtmlElement In htmlElements
            If element.GetAttribute("value") = "Sign In" Then
                element.InvokeMember("click")
            End If
        Next
hero9910 is offline  
Thanks
2 Users
Old 12/01/2013, 14:32   #6
 
Gameerish___'s Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 1,547
Received Thanks: 796
Quote:
Originally Posted by hero9910 View Post
Nein es gibt kein Element mit der ID "submit"

versuch stattdessen mal
Code:
        Dim htmlElements As HtmlElementCollection = WebBrowser1.Document.All
        For Each element As HtmlElement In htmlElements
            If element.GetAttribute("value") = "Sign In" Then
                element.InvokeMember("click")
            End If
        Next
Danke, Login geht jetzt.

Habe nur noch eine Frage.
Wie ist hier falsch ?

Gameerish___ is offline  
Old 12/01/2013, 14:37   #7

 
Syc's Avatar
 
elite*gold: 666
Join Date: Apr 2011
Posts: 5,811
Received Thanks: 2,417
Steht doch in der Fehlerbeschreibung. Wie willst du was mit ner If abfragen, was keinen Wert hat?
Syc is offline  
Thanks
1 User
Old 12/01/2013, 18:59   #8
 
elite*gold: 0
Join Date: May 2008
Posts: 132
Received Thanks: 120
Navigate ist eine Sub-Methode und hat somit keinen Rückgabewert.
krustx is offline  
Thanks
1 User
Old 12/04/2013, 22:35   #9

 
elite*gold: 128
Join Date: Jan 2011
Posts: 688
Received Thanks: 95
Regel das doch mit If Webbrowser1.Url = "http://bla.de"

Kannste ja schlecht eine Anweisung fragen, was gerade los ist, obwohl sie nichts macht!

Best regarda
Luxxus² is offline  
Old 12/05/2013, 11:44   #10
 
Gameerish___'s Avatar
 
elite*gold: 0
Join Date: Oct 2013
Posts: 1,547
Received Thanks: 796
Danke,aber habe es schon seit tagen.
Gameerish___ is offline  
Closed Thread


Similar Threads Similar Threads
NullReferenceException Problem.
08/07/2012 - CO2 Private Server - 6 Replies
Hey guys, I've been away quite a while but now I'm back. Anyways, I wanted to try this 5535 source I had in my computer from a while back but it is giving me an error I can't quite manipulate. This is the error line: if (_dataset.Tables.Rows.Count > _row) This is the error itself: Object reference not set to an instance of an object.
[C#] System.NullReferenceException bei List<>
07/08/2012 - .NET Languages - 3 Replies
Hallo bin momentan nebenbei an einem Projekt in C# am arbeiten und habe ein Problem mit der Exception im Titel. Folgendes versuche ich: In dem Programm gibt es eine Personenverwaltung. Ich habe eine Mutterklasse 'Entity' class Entity { int id; string name;
Nullreferenceexception
10/07/2011 - CO2 Private Server - 4 Replies
Alright i'm getting these errors on nobility. I never had these errors before but the error reads this line in MySqlReader.cs private MySqlConnection _conn = new MySqlConnection(ConnectionString); that line never had errors for me. Can someone please explain this exception to me and give me tips on how to fix it. I would appreciate it ever so much (:.
NullReferenceException
03/21/2011 - CO2 Programming - 12 Replies
Alright, This Damn Exception annoys me as fuck , and I've got No Idea why. I Believe I'm missing something.. Can somebody remind me what is it? I know It's un-pro question but ermm... here we go. http://i989.photobucket.com/albums/af15/RockArch/ Untitled.png?t=1300203698
[Help]NullReferenceException
11/23/2008 - CO2 Private Server - 3 Replies
Ok... Well first off, I feel like an idiot fot not knowing what to do here. But I'm completely lost, so if somene could point me in the right direction, I'd appreciate it. Seems this is completely random, sometimes it will occur after 30 minutes, sometimes the server can run for hours without an issue. But occasionally this kicks in, and everything freezes. The code effected is... if (Charr.MyClient.Online) if (MyMath.CanSee(Attacked.LocX,...



All times are GMT +1. The time now is 08:12.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.