Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm going to send back data to my sms gateway.first i have a querystring like this.
string mobileNo = Request.QueryString["msisdn"];
int dest = int.Parse(Request.QueryString["shortcode"].ToString());
string messageIn = Request.QueryString["msg"];
string operatorNew = Request.QueryString["operator"];
Then i'm going to assign a variables to it.
public void sendReply(string messageOut)
{
messageOut = "http://mygateway.com/api/mt?msisdn=mobileNo&body=msg&sender=shortcode&key=nvqow9rhfp&product_id=2116&operator=OperatorNew&country=us";
}
But i'm getting operator assignment error..
Check this.This parameter is wrong.this param not supplied.
&body=msg
Please verify your Key & Product id with the gateway owners.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have this error and I have no ideo about what should I do
The aim is when I click to button, it should read the word in textbox and save it into the string variable by its new factor.I have the error oin the topic
private void panel_button_kelimeekle_kaydet_Click(object sender, EventArgs e)
{
if(panel_checkbox_ing.Checked)
{
string (panel_textbox_kelimeekle_yab.Text) = Ingkelimeler[(Ingkelimeler.Length+1)];
}
}
If panel_textbox_kelimeekle_yab is already a textbox on your form, then you don't need to declare its type when you assign a value to it. C# thinks you're trying to declare a new string variable.
Change that line of code to
panel_textbox_kelimeekle_yab.Text = Ingkelimeler[(Ingkelimeler.Length+1)];
This probably won't solve all your problems, but at least it will get you on to the next error message. (You probably mean Length-1 in your array index, but there's really no way for us to know.)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
public class itemObject { public string items; }
values - item = "name1,name2" or items = "item3"
Need linq to split by ',' if exists else one string array.
This doesnt require linq, its the default behaviour of String.Split
var array = items.Split(',');
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
var ticketnumber = TempData["ticketId"] as Ticket;
ticketnumber.TicketId = model.TicketId;
db.SaveChanges();
HttpPostedFileBase file = Request.Files["ImageData"];
UploadRepository service = new UploadRepository();
int i = service.UploadImageInDataBase(file, model);
I have the value inside my tempdata but when i try to assign the value of it to the model value it doesnt save and even in debug it tells me the value hasnt changed so i just dont get what i am doing wrong.
You need to change the assignment:
From:
ticketnumber.TicketId = model.TicketId;
To:
model.TicketId = ticketnumber.TicketId;
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
my C# code is returning this from WebAPI
return Ok(new
{
email = user.Email,
sent = true
});
I want to make it so that the full email is not sent.
Can anyone suggest a good way that I could make it send:
The first 2 characters of the address
...
The last two before the # to the end of the address
So for example
davesmith#live.com
is returned as
da...th#live.com
Bit of a problem are emails with less then 4 character before #. You Could start with
private static string ShortenMail(string mail)
{
var regex = new Regex("^(.{1,2}).*?(.{0,2}#.*)$");
return regex.Replace(mail, "$1...$2");
}
And call it via ShortenMail("davesmith#live.com");
I changed it a bit, so shorter mails are possible.
You can do something like this maybe:
string email = "davesmith#live.com";
string maskedEmail = string.Format("{0}...{1}", email.Substring(0, 2), email.Substring(email.LastIndexOf("#") - 2));
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a string like below
he/a0h/a0dv/a0jks
I would like to be string become as below.
hehdvjks
Need to remove the "/a0" from the string.
The String.Replace method is what you're looking for, just do a;
String myString = "he/a0h/a0dv/a0jks"
myString = myString.Replace("/a0", "")
It'll return a modified 'myString' with all occurrences of the old value ("/a0") replaced with a new value (blank in this case).
The MSDN reference for String.Replace can be found at:
http://msdn.microsoft.com/en-us/library/fk49wtc1%28v=vs.110%29.aspx
var result = "he/a0h/a0dv/a0jks".Replace("/a0", string.Empty);