Question: <% strName="John Smith" %> Referring to the above, if you want to pass the contents of the strName variable in a hyperlink, which line of code would you use?
Answer: A. This cannot be done. The anchor is on the client and the variable is on the server. B. href="Encode.asp?name=<%=Server.URLPathEncode(strName)%>">click here</a> C. <a href="Encode.asp?name=<%=strName%>">click here</a> D. <a href="Encode.asp?name=<%=Server.HTMLEncode(strName)%>">click here</a> E. <a href="Encode.asp?name=<%=Server.URLEncode(strName)%>">click here</a> (Answer)
Question:
<% strName="John Smith" %> Referring to the above, if you want to pass the contents of the strName variable in a hyperlink, which line of code would you use? Answer:
A. This cannot be done. The anchor is on the client and the variable is on the server. B. href="Encode.asp?name=<%=Server.URLPathEncode(strName)%>">click here</a> C. <a href="Encode.asp?name=<%=strName%>">click here</a> D. <a href="Encode.asp?name=<%=Server.HTMLEncode(strName)%>">click here</a> E. <a href="Encode.asp?name=<%=Server.URLEncode(strName)%>">click here</a> (Answer) Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.
Answer should be complete in itself.
Related Questions
View Answer
<%@ Language=VBScript %> <%If false then> <!-- #INCLUDE FILE="FunctionOne.inc"--> <%Else> <!-- #INCLUDE FILE="FunctionTwo.inc"--> <%End If> What would the above code load?
<input type=radio name=rbSex value="M">Male <Input type=radio name=rbSex value="F">Female Referring to the above, which line of code would retrieve the selected radio button value?