Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Saturday, March 31, 2012

Submitting whole HTML document to Server

Is there a way to return the whole HTML document from the Client to
the Server "as is" so I can use ASP.NET to parse through it and look
for stuff?
I want to see what some client side JavaScript may have done to the
XHTML document."GMartin" <glenn.e.martin@.gmail.com> wrote in message
news:d9443226-88cf-4bb0-b1d6-4f9514c0ab02@.j20g2000hsi.googlegroups.com...
> Is there a way to return the whole HTML document from the Client to
> the Server "as is" so I can use ASP.NET to parse through it and look
> for stuff?
> I want to see what some client side JavaScript may have done to the
> XHTML document.
This doesn't directly answer your question, but it may be what you are
looking for.
http://projects.nikhilk.net/Projects/WebDevHelper.aspx
In addition to its many other features, it will show you the "live" HTML
source for a page (as modified by any javascript).
I'm looking to do it at runtime. Not with a utility while
programming.
On Feb 11, 1:31 pm, "Scott Roberts" <srobe...@.no.spam.here-webworks-
software.com> wrote:
> "GMartin" <glenn.e.mar...@.gmail.com> wrote in message
> news:d9443226-88cf-4bb0-b1d6-4f9514c0ab02@.j20g2000hsi.googlegroups.com...
>
>
> This doesn't directly answer your question, but it may be what you are
> looking for.
> http://projects.nikhilk.net/Projects/WebDevHelper.aspx
> In addition to its many other features, it will show you the "live" HTML
> source for a page (as modified by any javascript).

Tuesday, March 13, 2012

switch statement

I have the following switch statement and am getting the error:
not all code paths return a value
I am not seeing why.

publicbool checkNewMove(ArrayList myArray,int myInt)

{

switch (myInt)

{

case 4 :

if( System.Convert.ToInt32( myArray[13] ) == 0 &&

System.Convert.ToInt32( myArrayMusic [8] ) == 1 )

{

myArrayMusic [8] = 0;

myArray[4] = 0;

myArray[13] = 1;

pNum = 4;

tempAL = myArray;

printArray(tempAL);

bSuccess =true;

break;

}

break;

default :

{

bSuccess =false;

//return bSuccess;

break;

}

//break;

}// end switch


}
Suggestions?
Thanks,
ZathI have added the line you are missing in red

publicbool checkNewMove(ArrayList myArray,int myInt)
{
switch (myInt)
{
case 4 :
if( System.Convert.ToInt32( myArray[13] ) == 0 &&
System.Convert.ToInt32( myArray[WhateverNumberThisIsSupposedToBe] ) == 1 )
{
myArray[WhateverNumberThisIsSupposedToBe] = 0;
myArray[4] = 0;
myArray[13] = 1;
pNum = 4;
tempAL = myArray;
printArray(tempAL);
bSuccess =true;
break;
}
break;
default :
{
bSuccess =false;
//return bSuccess;
break;
}
}// end switch
return bSuccess; [EDIT]
}


Thanks. don't know why I didn't see that. I have written many functions that need a return.
Must have been I was looking too hard at the switch.
Zath