compare the string without using stringcomp function?

Answer Posted / cnu_thatavarthi

2. how to compare values without using String compare function?
Ans:
Option Explicit
Dim strValue

strValue = "Thatavarthi"

If strValue = "Thatavarthi" Then
MsgBox "Both strings are same"
Else
MsgBox "Both strings are not same"
End If

'Expected out Put
---------------------------

---------------------------
Both strings are same
---------------------------
OK
---------------------------

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between modular and data and keyword driven framework

1969


Both Static and dynamic arrays are handled by VB script. Is it true?

849


Explain about adodb.stream class?

842


I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..

2026


if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.

1666


What purpose does ‘on error resume next’ serves?

813


What is the use of option explicit in vbscript?

780


i have a problem with this error(this error related edit and delete button,when i click this button in datagrid..i will get this error)"Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation." this is my code : <%@ Page Language="VB" Debug="false" %> <%@ import Namespace="Sytem.Data" %> <%@ import Namespace="System.Data.OleDB" %>

(Search Based On Staff I.C No) IC.No (XXXXXX-XX-XXXX)   ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> ' runat="server"> Total Leave Taken : Days

2546


What are the naming conventions while declaring a variable in the vbscript language?

852


Mention how to assign a date value to a variable?

839


How will you get the smallest subscript of an array in vbscript?

1120


Explain few date functions in vbscript?

828


Why is error handling required?

783


Mention what is the use of option explicit in vbscript?

786


Which date function is used in the vbscript language to find the difference between the 2 dates?

823