asp.net - Strings in ASP? -
I have some APSX code that I'm trying to modify for a programmer that is out on medicaly leave . I'm not an ASP male, but rather C ++ So what I want to do is Delare is a string, check the first 4 characters and if it does 'http' do something else If not, then Here's what I have: But I get these types of errors: Compiler Error Message: CS0103: The name 'ASP.zen_aspx' does not exist in the name 'ASP.zen_aspx' Various instances of doing my goggle in this way ....
string strYT = left (objFile, 4); If (strYT == "http") {pnlYT.Visible = true PnlIntro.Visible = false; PnlVideo.Visible = false; } And {pnlYT.Visible = false; PnlIntro.Visible = false; PnlVideo.Visible = true; PrintText (objFile); }
Here VB Is in
dim string string = "http://mywebsite.com" if str.StartsWith ("http: //") then '' # is the true stuff pnlYT.Visible = true PnlIntro.Visible = false pnlVideo.Visible = false or else '' This is the false stuff pnlYT.Visible = false pnlIntro.Visible = False pnlVideo.Visible = true end then
here in C #
string str = "http://mywebsite.com"; If (str.StartsWith ("http: //")) {// This true stuff is pnlYT.Visible = true; PnlIntro.Visible = false; PnlVideo.Visible = false; } Else {// This false material is pnlYT.Visible = false; PnlIntro.Visible = false; PnlVideo.Visible = true; }
Comments
Post a Comment