Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Build says there's errors, but errorlist shows 0
Message
From
02/05/2019 13:27:56
 
General information
Forum:
C#
Category:
Troubleshooting
Miscellaneous
Thread ID:
01668369
Message ID:
01668372
Views:
31
>>Hello again, Happy Peoples
>>
>>Working on a webpage (asp) in the code behind and I go to run the page to test the latest code added:
>>
>>
>>    string SearchString = Request.QueryString["SearchString"].ToString();
>>    if (SearchString.Length != 0)
>>    {
>>      if (SearchString.IndexOf(":") > 0)
>>      {
>>        string[] vs = SearchString.Split(':');
>>        GetAccessInfo(vs[0]);
>>        Session["NewEdit"] = false;
>>      }
>>      else
>>        GetAccessInfo(SearchString);
>>      Session["NewEdit"] = false;
>>    }
>>    else
>>      Session["NewEdit"] = true;
>>
>>
>>Now, the VS editor shows no problems - but when I go to run it, I get the "There were errors" Msg window and in the Output box it shows:
>>
>>"...\ARDetails.aspx.cs(201,88): error CS1525: Invalid expression term ':' "
>>"...\ARDetails.aspx.cs(201,89): error CS1002: ; expected "
>>"...\ARDetails.aspx.cs(201,92): error CS1002: ; expected "
>>"...\ARDetails.aspx.cs(201,92): error CS1525: Invalid expression term ':' "
>>
>>I hit 'No' so it will show me where the errors are, and the Error List shows "0 Errors", "0 Warnings", and 5 Messages where is wants to simplify object initialization (but when I take its advice and make the suggested change, it then pops up with an error on that change, so I ignore them).
>>
>> I commented out the new code to see if that cleared the issue, it didn't - which means it's suddenly jumping up and down on code that's been running for a month (at least)
>>
>>What's going on? Can anyone point me in a direction that will lead me to whatever's causing this?
>>
>>Thanks all
>
>Split() expects array:
>
> string[] vs = SearchString.Split( new  Char[] {':'}  );
>
Unfortunately, that didn't solve the problem...just re-arranged the order of the errors in the Output Window.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform