I have the following piece of code
where my problem is in method SakerhetsKod.ToString().Equals("muris")
that always returns false although i
View Complete Post
View Complete Post
Anyone have any experience with this?
We are using VS 2005 for the front end, and vs 2010 for the web services part (asmx), not wcf yet.
Web service works just like the vs2005 when run locally, no problems.
Connecting to it from a test app returns an empty string. Connecting to a 2005 app doesn't!
Anyone run into this before or have a suggestion? Surely vs 2005 can connect to web services from a later version?
I'm trying to do date validation on a date and time picker through code (i want to make sure that the date is later than today and that the next date is at least one day later than that).
But when i try to get the value in the chagned event, i keep getting empty string as value.
What am i doing wrong here??
This is the code:
public void LeaveRequestFrom_Changed(object sender, XmlEventArgs e)
// Write your code here to change the main data source.
XPathNavigator xroot = MainDataSource.CreateNavigator();
XPathNavigator fromdate = xroot.SelectSingleNode(
if (fromdate.Value != "")
//Make sure the from date is in the future
if (DateTime.Parse(fromdate.Value) < DateTime.Today.AddDays(1))
Consider this code;
Dim Var1, Var2 As String
Var1 = "TEST"
Var2 = "es"
If Var1 Like "*" & Var2 & "*" Then
It returns no match because it is case sensitive. I need it to return a match (so case insensitive) and it needs to be fast because i am using it to filter records on the fly as the user types. Using .ToLower is slow when you are dealing with 1000's of repetitions.
Is there a more efficient way to do what i want without the performance penalties of converting them both to lower case every time?
String.Compare doesnt seem to cater for it.
I am facing very odd problem, when I check my xml string than in header it contain one unwanted string square , like below, due to that casting to object is not happening. Due to that it returns null
But when I remove  and convert to object then it works fine. Any one has any idea.
I have a bound data field, a detailsview, one of the records I have formatted to currency in the item template. Yet when I go to delete a record, I get a error message "Input string was not in correct format". Take away the formatting and the page runs fine. I tried changing the datatype from int to money, it makes no difference. Ideas?
I just ran into what I consider a very strange issue in the execution of some code that I thought I had completely well-understood. Basically, I was using this kind of notation:
If strOne.equals(strTwo) Then
If strOne = strTwo Then
I came from a c and java background, and using the '=' operator for comparison has always made me cringe, so I've used the .equals() comparison function thinking that it was equivalent.
But just now some of my code broke. It encountered a string containing "Eagle's Nest: Dawn Patrol", used the .equals() to compare it to "Eagle's Nest: Dawn Patrol" and declared them not equal. I changed the code to use '=' rather than '.equals()' and it declared them equal. I also did this:
If strOne.Replace("'", "").Equals(strTwo.Replace("'", "")) Then
and again, it declared them equal.
This has me a little rattled because my code is filled with the use of .equals(), and I've used it assuming that it was no different than writing strOne = strTwo. I've scanned the interweb looking for information about this. I have not found any information about odd interactions between the apostrophe (or other) character(s) and .equals(). Microsoft's documentation does not hint at any subtle differe
Background: SharePoint 2007 servers with Site Collection Admin access, using SPD 2007.
While attempting to build email body and subject line text using Dynamic text action in a workflow, I can add a look-up to a field (defined as People/Groups) to return a value for the email text. While this does give that correct reference to the Person,
the returned value is the Account value, not the Name value.
Example Text Returned: ...a new vaation request has been submitted by
Domain\JSmith for your review and approval...
Desired Text Returned: ...a new vaation request has been submitted by
John Smith for your review and approval...
In the People and Groups: User Information page it show the following fields:
Given that I can see that the standard built-in Task Notification emails used in SharePoint 2007 show the Name, not the Account, I'm wondering how/if I can do the same in my dynamic string look-up.
Looking at the XOML XML code I see the lookup, and I'm not disuaded by editng the code by hand (by opening as XML in SPD) instead of the using the SPD GUI for this.
Here's how the look-up is coded by the SPD GUI:
i am looking for a function that takes two string parameters
str1 = "hello how are you today mr john"
str2 = "how today"
and in return it shoud highlight the words "how" and "today".
Any ides? I prefer if its possible using reg expression...Thanks
I store some values from code behind to a label which is Hidden !
<asp:Label ID="lbl_Hidden" runat="server" Visible = "false"></asp:Label>
and at the page load event i retrieve the value of the label & assign it to a string !
stringvalue = lbl_Hidden.Text;
Now i dont know why this manipulation does'nt work !
I've a character 'A' in the string and i'm unable to replace it with a space !
stringvalue.Replace(A, " ");
Wot do u think abt it ????