Answer the question
In order to leave comments, you need to log in
How to declare a variable with Dictionary type in asp?
Dear gurus, I don't know asp, but it became necessary to edit the scripts on the server. I wanted to create an object of dictionary type and pass it through json. But I keep getting a 500 error every time I try to do this. I add a simple code and the error immediately falls out:
Dim dictionary As New Dictionary(Of String, Integer)
dictionary.Add("Dot", 20)
Answer the question
In order to leave comments, you need to log in
Well you ASP and Basic that do not mix in one heap. And so, by the way - ASP or ASP.NET? The difference is very, very small. Why did you decide that the 500 error is an incorrect Dictionary creation? Typically, incorrect Dictionary creation results in a compile-time error. What does the debugger show? You actually said that you wrote 2 lines of code and you get a 500 error under the web. There's a lot of empty space in the middle, which will help solve your problem a lot.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question