Now i send message array as a query string to another page.but when i catch the next page we have a arr.Length know ( normally it shows the intellisense) but in this case it doesn’t show.
here is msg_arr pass to the another page
private void check(string keyword , params Array[] msg_arr)
{
switch (keyword.ToUpper())
{
case "SETTELG":
Response.Redirect("../SMSFunction/SeenSMS.ascx?value=1&arr" + msg_arr);
break;
Below code is the next page i wanted to catch that passed value & array(msg_arr).but length doen’t work
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string Moose = Request.QueryString[1];
}
if (msg_arr != null)
{
if ((msg_arr.Length == 3) && (msg_arr[1].ToLower() == "slett"))
{
}
}
}
here is the second code screenshot,you can see Length not shown

Quite a few things wrong here.
Is this function really being passed an array of
Arrays? I’d have thoughtstring[]orobject[]to be a more likely type to be passed.That’s going to call
ToString()onmsg_arr, which, it being an array, will produce a result like this:Arraydoesn’t overrideToString(), so you get the one fromObjectwhich outputs the fully qualified name of the type – which I assume isn’t what you want.Finally, we reach your second piece of code, but you’ve not even shown us any code which attempts to set the new
msg_arrvariable. But it’s not going to be able to get the original value ofmsg_arr, since you’ve not passed that across yet.You need to decide how you want to pack your array into the query string. If, say,
msg_arrshould have been an array of readable strings (params string[] msg_arrin thecheckdefinition), then you might try something like:where
|is a character that shouldn’t appear in the strings being passed. (String.Join)You can then reconstruct it back into an array with something like:
(
String.Split)Of course, there may be a concern now if the length of strings (or the number of them) is too large, it may not be appropriate to pass them via a query string at all.