locked
VB 2010 ......How to insert code in MSDN Question Body? RRS feed

  • Question

  • 
    
    
    
    
    • Moved by Reed KimbleMVP Tuesday, September 30, 2014 6:06 PM issue using code block tool when posting / not VB.Net specific
    • Moved by Dave PatrickMVP Wednesday, October 1, 2014 1:51 AM
    Tuesday, September 30, 2014 3:31 PM

Answers

All replies

  • Do you mean how do you insert code in a post on this forum? If so, click on the icon with the <> on it at the top of the post.

    If you mean something else, please give more details.

    Tuesday, September 30, 2014 3:36 PM
  • Yes, I know, and the Insert Code Block appears.  What I can't determine is how to enter code from my vb form into the Body.  What I have been trying is to copy the code into the left page.  That works. But, when I go to preview the code and insert it, I get a script error message, which is as far as I have been able to achieve.

     Can you help?    Thanks.......

    Tuesday, September 30, 2014 5:25 PM
  •     Public Function TestCodeInsertOnMSDN() As String
            Return "It works for me"
        End Function

    Might be your browser, of possibly something to do with the specific code you are inserting. Try something simple like a single function and see if that works.


    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com


    • Edited by kleinma Tuesday, September 30, 2014 5:30 PM
    Tuesday, September 30, 2014 5:29 PM
  • It has always worked for me. Are you selecting the correct language in the upper left of the window?

    If the language is not the problem, I'm not sure what it could be. You might want to say what browser (and what version) you are using.
    • Edited by Blackwood Tuesday, September 30, 2014 5:30 PM
    Tuesday, September 30, 2014 5:29 PM
  • 

    I tried that...........Did not work.......If I hit a return here.....On trying the Insert Code Block, I can copy code to the left panel.  When I preview the code,  it does not adhear to the indentations of the code in the right panel, then when I try to insert the code from the right panel it yields a script error code: http://11social.s-msft.com/Forms/Scripts/2012.1.214/telenik.editor.min.js? cver=0%0d%0a....Any ideas how to fix this?....................I did set the language to vb.net


    • Edited by Auggie46 Tuesday, September 30, 2014 6:09 PM
    Tuesday, September 30, 2014 6:03 PM
  • 1 - Click the Reply link.

    2 - Click the 'Insert Code Block' button.

    3 - Paste code into left pane of 'Insert Code Block' popup.

    4 - Click 'Insert'

    5 - Click 'Submit'.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Tuesday, September 30, 2014 6:20 PM
  • Thanks, but that ended with the same result in with a slightly different script error......
    Tuesday, September 30, 2014 6:27 PM
  • Have you tried an alternate browser? Also, please include a screenshot of the error (If you're able to, that is. If you're told you're not verified, you'll need to post in the sticky verification thread at the top of this forum and wait for an admin to verify your account).

    Try posting some random text using the 'Insert Code Block' button as well, just as a test.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Tuesday, September 30, 2014 6:31 PM
  • I tried typing in a random sentence in the left panel and inserting it.  I still got the script error...........I'm doing all of this in Visual Studio.  What has a web browser have to do with it, or am I missing the point of the question? ..........Once the Script Error window comes up, I can't do anything until I close the window, so I don't know how to send you a screenshot, I'm not sure I know how to do that anyway?............Thanks

    Tuesday, September 30, 2014 6:42 PM
  • I've never used VS to directly browse the forums.

    Open up an actual web browser and try again.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Tuesday, September 30, 2014 6:45 PM
  • I just hit the forums page via VS2010 and had to click through 14 script error popups. Now I understand why you're not pressing Enter between each line, as that also causes a script error to appear. I'd say that browsing the forums directly from VS2010 is completely and utterly broken.


    EDIT: Win7/IE11

    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Tuesday, September 30, 2014 6:54 PM
  • OK, I'm not sure I'm doing what you want.  I opened the google browser, what I normally use is Bing.  I tried to insert some text with the same resulting Script Error.............Right now I'm working in Visual Studio with the Google browser opened in a separate window. Is this the intent of your direction?
    Tuesday, September 30, 2014 6:59 PM
  • Basically I'm saying that you shouldn't be browsing the forum from within VS2010 at all. Paste this URL into any other web browser (IE/Chrome/Firefox/Opera/etc):

    http://social.technet.microsoft.com/Forums/en-US/2b74a78d-ea55-4ab7-a97a-68e3b9194325/vb-2010-how-to-insert-code-in-msdn-question-body?forum=reportabug

    Sign into your Microsoft Account (top right of the window) and then try replying here.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    • Marked as answer by Auggie46 Tuesday, September 30, 2014 8:11 PM
    Tuesday, September 30, 2014 7:02 PM
  •  Dim connection As New OleDbConnection(connectionString)
            Dim insertCommand As New OleDbCommand(insertStatement, connection)

    Now that worked.........Never knew I could do this..........Are you going to fix the Visual Studio glitch?  That drove me up the wall

    Thanks to all of you.  I can now continue with my programming issue question.  See you later........Thanks again!!

    • Marked as answer by Auggie46 Tuesday, September 30, 2014 8:11 PM
    Tuesday, September 30, 2014 7:17 PM
  • I'm glad it worked out, good luck with your issue.

    I'm not sure if MSFT will end up addressing this problem, as I'm not sure if the root issue lies in VS2010, IE11, or something else entirely.

    We'll see if we get a reply from someone official (I'm just a normal forum member, not Microsoft affiliated in any way).


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    • Marked as answer by Auggie46 Tuesday, September 30, 2014 8:10 PM
    Tuesday, September 30, 2014 7:23 PM
  • This could possibly shed some light on why this issue exists:

    http://weblog.west-wind.com/posts/2011/May/21/Web-Browser-Control-Specifying-the-IE-Version


    Matt Kleinwaks - MSMVP MSDN Forums Moderator - www.zerosandtheone.com

    Wednesday, October 1, 2014 2:10 PM