Strings in ASP?
Posted
by TSL
on Stack Overflow
See other posts from Stack Overflow
or by TSL
Published on 2010-06-14T22:33:44Z
Indexed on
2010/06/14
22:42 UTC
Read the original article
Hit count: 124
ASP.NET
|string-manipulation
Hi All,
I have some APSX code that I am trying to modify for a programmer that is out on medicaly leave. I am not an ASP guy, but rather C++
So what I want to do is delare a string, check the first 4 characters and if it is 'http' do something, if not, something else.
Here is what I have:
string strYT= Left(objFile, 4);
if (strYT=="http") {
pnlYT.Visible = true;
pnlIntro.Visible = false;
pnlVideo.Visible = false;
}
else {
pnlYT.Visible = false;
pnlIntro.Visible = false;
pnlVideo.Visible = true;
PrintText(objFile);
}
But I get errors like:
Compiler Error Message: CS0103: The name 'Left' does not exist in the class or namespace 'ASP.zen_aspx'
My googling turns up many examples of doing it just like this.....
© Stack Overflow or respective owner