I am grabbing data from a peoplepicker control (sharepoint) that compiles users into a string. For instance, if the user added 3 users, the string would look like: John Doe CONTOSOjdoe User Jane Doe CONTOSOjadoe User John Smith CONTOSOjsmith User I want to use Split with"User" as the delimiter. Since the delimiter is 2+ characters I'm getting the error: too many characters in character literal. Tried to specify User as the delimter like:
When I select a row from a grid view to update the fields of this row appearin many textboxes and I have an email field which I want it to split into 3 textboxes to updateex:if I have this email: firstname.lastname@example.org I want the xx appears in first textbox and yy appears in second textbox and com appears in third textbox I actually did it correctly but it raises an error when trying split the last part(com) here is my code:
And then follow by setting the Text property programitically. I've accomplished something similar to this on a different page using a FormView, but only for ReadOnly mode and it was handled in the databound event on that page.
I get the error "The name 'DetailsView1' doesn't exist in the current context." when trying to do the above mentioned. When trying the same line in the databound event here, I get the same error.
I would think that this would work pretty seamlessly, but I am having trouble getting the text from a textBox control in an accordion pane's content to pass into the paypal web payments https post.
If I put an amount in the querystring in my codebehind isntead of passing the text string and click the button in the accordion pane, it works perfectly on the paypal page. But for some reason, I am getting a null return in the text string when I try to make the amount in the querystring whatever the text in the textbox is.
I have tried putting the accordion in an update panel and got the same results....
Am I missing something the get the text from the textbox?
Here is how I am getting the text string in codeBehind:
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Dim amt As String = donorAmt.Text Response.Redirect("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=XXXXXX@XXXXX.org&amount=" & amt & "&no_note=0&item_name=ALT Donor Level Annual Membership&sra=1¬ify_url=http://XXXXX.com/IPN.aspx&no_shipping=0&return=http://www.XXXXXX.com/donate/thanks.aspx&rm=2") End Sub
Note: Some of the paypal string has been removed for privacy
I am able to populate a text box with a long string. This string is a collection of email addresses, I am wondering how I can split this string so that I am able to get the individual email addresses? If I select multiple email addresses it come through like Example: email@example.com@test.com in the one text box how could I split this so I could get firstname.lastname@example.org in one text box and email@example.com in another?
Protected Sub BtnEmailList_Click(sender As Object, e As System.EventArgs) Handles BtnEmailList.Click ' StringBuilder object Dim str As New StringBuilder()
' Select the checkboxes from the GridView control For i As Integer = 0 To GrdVwClassEmail.Rows.Count - 1 Dim row As GridViewRow = GrdVwClassEmail.Rows(i)
I have the following string, is it possible to split seperate & make as comma seperator string by 'and', 'or' and 'not' operators. "Application AND for Payment OR John OR Smith OR Ralph Doe NOT Bob NOT Ad Hock" and assign to the following variables:
I have a string which is stored as a cookie. The string is made up of the following data:
int userId DateTime expiryDate
A user can have a number of these, so I store them like this "userId,expiryDate$userId,expiryDate"
When I retrieve the cookie value, I then split the string and add it to a list. The list is List<OpenReviews> openReviews, which contains the two variables above. I use the following piece of code to split the string:
As you can see it goes to an array which I then have to iterate through to add it back into my list. All of which seems extremely long winded. I believe I can use the code above to put it into an IEnumerable<IEnumerable<string>> format. The problem is I don't know how to then get it into my List<OpenReviews> I'm therefore looking at getting the split string into my OpensReviews list as efficiently as possible.