How to declare a variable of type Dictionary in asp?

Dear guru, asp do not know, but there was a need to edit the scripts on the server. I wanted to create an object of type dictionary and give it via json. But I always comes an error 500 whenever I try to do it. Add a simple code and immediately throws out error:
Dim dictionary As New Dictionary(Of String, Integer)
dictionary.Add("Dot", 20)

Maybe I have something not hooked up?
June 14th 19 at 19:09
1 answer
June 14th 19 at 19:11
Well, you ASP and Basic don't mix together. And so, by the way - ASP or ASP.NET? The difference is very very weak. Why did you decide that the 500 error is a wrong creation of the Dictionary? Usually wrong creating the Dictionary causes the error of the compilation stage. What the debugger shows? You actually said that you wrote 2 lines of code and under the web get a 500 error. In the middle of a lot of empty space, which would help solve your problem.
Hell if I know what it is. Yes, there is apparently ASP. On account of the errors -because adds 2 lines of code and immediately the server crashes. Yes, I proboval different. It is also not not working connection System, etc. and simple arrays for example, or to declare variables without problems and to work with them. That is the feeling that just the bare basic costs. And he uses the server to create a connection such as ADO. And the database he has to access. Dictionary I need to json serialize an associative array was. Access to the debugger I have, but there is only access files via ftp or rather to one in which all collected 3000 lines in visual basic with simple logic. So I think that there is something very cut-down costs. Because I even cannot create. - roger.Greenfelder commented on June 14th 19 at 19:14
if this is classic ASP, then perhaps VBScript, which is very different from Visaul Basic .NET and presented the syntax is not correct. In classic ASP the default file extension is .asp. Debugging difficult to carry out. Collections no. If you want to get JSON, it is easier to display text as is. Or to abandon such ancient technology :-) to Mix classic ASP with modern it is possible, they don't particularly need each other to interfere. - Toney_Pur commented on June 14th 19 at 19:17

Find more questions by tags ASP.NETVisual Basic