ⱧØⱠɎ₴₵ⱧɎ₮₮
ⱧØⱠɎ₴₵ⱧɎ₮₮
CC#
Created by ⱧØⱠɎ₴₵ⱧɎ₮₮ on 10/5/2023 in #help
❔ I am Kinda lost right now
Getting all data from DB in Csharp and adding each Row to the HTML Table?
7 replies
CC#
Created by ⱧØⱠɎ₴₵ⱧɎ₮₮ on 10/5/2023 in #help
❔ Incurable ERROR ???
I am trying to Post a database strings and ints to a webpage using C# I keep getting
System.FormatException: 'Input string was not in a correct format.'
System.FormatException: 'Input string was not in a correct format.'
The line that triggers this is
byte[] data = Encoding.UTF8.GetBytes(string.Format(pageData));
byte[] data = Encoding.UTF8.GetBytes(string.Format(pageData));
And it points to this static string Line 52
"<script type = 'text/javascript'>" +
Line 40: " var data = " +
"[{'" +
"'ServerID': 1," +
"'ServerName': 'Default Server'," +
"'ServerPassword': 'UNCHANGEDME'," +
"'ServerCurConnections': '0'," +
"'ServerMaxConnections': '32'," +
"'ServerIP': '127.0.0.1'," +
"'ServerPort': '7728'," +
"'ServerLocked': 'true'" +
"}] " +
" var container = document.getElementById('Online Servers');" +
Line 52: " var hot = new Handsontable(container, {data: "+ HostManagment.GetServerList()+", rowHeaders: true, colHeaders: false," +
" colHeaders: ['ServerID','ServerName','ServerPassword','ServerCurConnections','ServerMaxConnections','ServerIP','ServerPort','ServerLocked'], " +
" columnSorting: true, " +
" sortIndicator: true});" +
"<script type = 'text/javascript'>" +
Line 40: " var data = " +
"[{'" +
"'ServerID': 1," +
"'ServerName': 'Default Server'," +
"'ServerPassword': 'UNCHANGEDME'," +
"'ServerCurConnections': '0'," +
"'ServerMaxConnections': '32'," +
"'ServerIP': '127.0.0.1'," +
"'ServerPort': '7728'," +
"'ServerLocked': 'true'" +
"}] " +
" var container = document.getElementById('Online Servers');" +
Line 52: " var hot = new Handsontable(container, {data: "+ HostManagment.GetServerList()+", rowHeaders: true, colHeaders: false," +
" colHeaders: ['ServerID','ServerName','ServerPassword','ServerCurConnections','ServerMaxConnections','ServerIP','ServerPort','ServerLocked'], " +
" columnSorting: true, " +
" sortIndicator: true});" +
Now when i fix the Line 52 With {{}} Line 40 does the same but when there both fixed i get nothing on the page its blank
16 replies