File tree Expand file tree Collapse file tree 4 files changed +11
-91
lines changed
VS_Snippets_Winforms/System.Windows.Forms.HtmlElement/CS
language-reference/operators
visualbasic/VS_Snippets_Remoting/Net_Listener_Basic/VB Expand file tree Collapse file tree 4 files changed +11
-91
lines changed Original file line number Diff line number Diff line change @@ -307,19 +307,19 @@ private void AddTopPageMessage(String message)
307307 {
308308 HtmlDocument doc = webBrowser1 . Document ;
309309
310- // Do not insert the warning again if it already exists.
311- HtmlElementCollection returnedElems = doc . All . GetElementsByName ( "ADatumWarningDiv" ) ;
312- if ( ( returnedElems != null ) && ( returnedElems . Count > 0 ) )
310+ // Do not insert the warning again if it already exists.
311+ HtmlElementCollection returnedElems = doc . All . GetElementsByName ( "ADatumWarningDiv" ) ;
312+ if ( ( returnedElems != null ) && ( returnedElems . Count > 0 ) )
313313 {
314- return ;
314+ return ;
315315 }
316316
317- HtmlElement divElem = doc . CreateElement ( "DIV" ) ;
318- divElem . Name = "ADatumWarningDiv" ;
319- divElem . Style = "background-color:black;color:white;font-weight:bold;width:100%;" ;
320- divElem . InnerText = message ;
321-
322- divElem = doc . Body . InsertAdjacentElement ( HtmlElementInsertionOrientation . AfterBegin , divElem ) ;
317+ HtmlElement divElem = doc . CreateElement ( "DIV" ) ;
318+ divElem . Name = "ADatumWarningDiv" ;
319+ divElem . Style = "background-color:black;color:white;font-weight:bold;width:100%;" ;
320+ divElem . InnerText = message ;
321+
322+ divElem = doc . Body . InsertAdjacentElement ( HtmlElementInsertionOrientation . AfterBegin , divElem ) ;
323323 }
324324 }
325325 //</SNIPPET9>
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ Public Class ListenerBasic
5959 output.Close()
6060 listener.Stop()
6161 End Sub
62- ' <Snippet2>
62+ ' </ Snippet2>
6363
6464 ' <Snippet3>
6565 ' This example requires the System and System.Net namespaces.
You can’t perform that action at this time.
0 commit comments