Hi Everyone, Would anyone know whats asp.net equivalent to the below script ? <?php echo $_GET['keyword']?>
Hi, Thank you so much ! Do you know if I would need to append this code at the end of my url so my visitors can view the "printed" keyword ? http://www.myinternetsite.com/index.asp?keyword={keyword}
hi everyone, i tried the above code and it worked but my image and the {} around my keywords are showing. would anyone know why ? thanks for everyones time P.S. does anyone know how to edit the script so the the first letter of each keywor is in caps ?
Remove the {} from the URL. If you only want the first letter caps and nothing else then <% dim mykeyword mykeyword= Request.QueryString("keyword") mykeyword= UCase(Left(mykeyword, 1)) & LCase(Mid(mykeyword, 2)) Response.Write (mykeyword) %> Code (markup): Or if you want the first letter caps and the rest exactly as it was entered remove the LCase statement.
Hi Chrisn, I really appreciate the help. I'm trying to get the second letter of the second word in caps. I add the "UCase (Mid(mykeyword, 2))" and everything becomes CAPS. I don't know why. Does anyone know what code it takes Also, for some reason my images on my landing page aren't showing. Everything is appearing as a "X". Is it possible to PM someone my URL. Perhaps you can take a look at it and tell me what you think. Why does anyone think this is the case ? Thanks, John
Right second letter of the second word. I think I understand the question. I'm assuming you have the second word in a separate variable and not part of a string with a space between. The number in the mid command indicates the start position in the string, if you don't supply another number after it takes the full length of the string, if you do supply the optional value you can specify the length of the selection you want. So if my string is "chris" and I want it to become cHris I would use this code: <% mykeyword2 = LCase(Left(mykeyword2, 1)) & UCase(Mid(mykeyword2, 2, 1)) & LCase(Mid(mykeyword2, 3)) %> Code (markup): PM me the URL and I'll look at the images.
Hi Chris, I meant the first letter of each word. "Compare Car Insurance" the "CCI" are in caps. Thats what I want to do. I will PM you the urls. Thanks for your time. I appreciate your help. Thanks !
OK, I have PMed you the fix for the images, Re capitalising every word, as you only have one keyphrase you need to split it up into words, use the split function to do this. <% Dim mykeyword Dim mykeywords mykeyword = Request.QueryString("keyword") mykeywords = Split(mykeyword, " ") For i = 0 To UBound(mykeywords) response.write UCase(Left(mykeywords(i), 1)) & LCase(Mid(mykeywords(i), 2)) If Not i = UBound(mykeywords) Then response.write " " Next %> Code (markup):
Hi, Thanks for the reply. I appreciate it. Will this code work when someone lands on my landing page from either yahoo, google and msn and they search for lets say "car insurance" will the phrase "car insurnace" be inserted onto the page ?