|
Yes, it's possible. Assuming you are a reasonably competent C# programmer, and know how to use Google to find the documents that define the vCard format.
|
|
|
|
|
See this[^] example.
/ravi
|
|
|
|
|
I managed to generate the vcf file using the below code from your reply and I am able to open it on my PC and m Samsung Galaxy S5 but not the iPhone. Why is that?
var contact = new GoogleContacts()
{title = "Mr.", first_name = "Kookoo", last_name = "NooNoo", work_phone = "17171717", mobile_phone = "39393939", email = "jassim@myemail.com", im = "jasmanskype" };
var vcf = new StringBuilder();
vcf.Append("BEGIN:VCARD" + System.Environment.NewLine);
vcf.Append("VERSION:3.0" + System.Environment.NewLine);
vcf.Append("TEL;type=HOME;type=VOICE;type=pref:" + contact.mobile_phone + System.Environment.NewLine);
vcf.Append("FN:" + contact.first_name + " " + contact.last_name + System.Environment.NewLine);
vcf.Append("END:VCARD" + System.Environment.NewLine);
var filename = @"C:\temp\mycontact.vcf";
System.IO.File.WriteAllText(filename, vcf.ToString());
Technology News @ www.JassimRahma.com
|
|
|
|
|
I suspect your iOS code is buggy.
/ravi
|
|
|
|
|
but I tried it with more than one iphone..
Technology News @ www.JassimRahma.com
|
|
|
|
|
Are you saying you ran the same code on more than one iPhone?
/ravi
|
|
|
|
|
Uhhh, if your code is buggy, how is changing out the phone going to fix that??
You might want to try and find out if the iPhone can successfully read and process a vCard file and/or what it's looking for in the vCard.
|
|
|
|
|
so you mean the coded I posted is correct and exported vcf should work on iPhone? do I need to add any special element in the file to make it compatible with iPhone?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Jassim Rahma wrote: so you mean the coded I posted is correct and exported vcf should work on iPhone
Where on earth did I say that?
Jassim Rahma wrote: do I need to add any special element in the file to make it compatible with
iPhone?
That's a researtch project for you. I have no idea and I've got my own research to do on my own problems.
|
|
|
|
|
Hi, I am opening the UDL file from Browse button in WPF application. After clicking on OK button of UDL wizard connection information should be displayed in WPF application's Datagrid. Please give me any way to do this.
|
|
|
|
|
You have already posted this question in the .NET Framework forum[^].
Posting the same question in multiple forums on the same site is only going to annoy the people who would otherwise be trying to help you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
// datagridview name is dgdaily.
i got error
"System.NullReferenceException occurred
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=final
StackTrace:
at final.DailySheet.UpdateLabelText() in h:\final\final\final\DailySheet.cs:line 122
InnerException:
"
//my code start
updatelabeltext()
{
Label[] la= new Label[10];
int counter1;
int counter2;
int i = 0;
for (counter1 = 0; counter1 < (dgdaily.Rows.Count-1); counter1++)
{
int sum = 0;
if (dgdaily.Rows[counter1].Cells["destination"].Value != null)
{
string x = dgdaily.Rows[counter1].Cells["destination"].Value.ToString();
int descount = 1;
for (counter2 = 1; counter2 < (dgdaily.Rows.Count-1); counter2++)
{
string y = dgdaily.Rows[counter2].Cells["destination"].Value.ToString();
if (x==y)
{
descount++;
sum = descount - 1;
}
}
la[i].Text = dgdaily.Rows[counter1].Cells["destination"].Value.ToString()+":" + sum.ToString();
i++;
}
}
}
|
|
|
|
|
Member 10991491 wrote: StackTrace:
at final.DailySheet.UpdateLabelText() in h:\final\final\final\DailySheet.cs:line 122 Which line of your code snippet is line 122?
Member 10991491 wrote: InnerException: What's the inner exception?
|
|
|
|
|
Hi,
I need a code for printing a receipt in a WPF (C#) application using PrintDocument or another one else.
Thanks
|
|
|
|
|
OK. The only code you're going to get is the code that YOU write yourself.
Nobody here is going to do it for you and just Googling around for "print a receipt from a WPF app" is going to get you some vague code samples that you're going to have to adapt anyway.
|
|
|
|
|
your code is totaly right but still some thig error is held in this code so please check it oncve again please
|
|
|
|
|
Uhhh...Just who do you think you're replying to?
|
|
|
|
|
|
|
|
Another way is:
1. Create RDLC or Report File for as per your print document requirement.
2. Assign DataSet to you report file.
3. Create PDF file in specified location.
4. Using Browser control you can show it in pdf viewer in you apps.
5. And Generate print from pdf viewer.
|
|
|
|
|
I have a web service and i send parameters date the it's give me exception string is not in good format my code is in v.b. and web service language is c#
|
|
|
|
|
At a guess, it's a string - or you wouldn't be converting it. Which implies the service computer and the application computer are using different locales, or cultures.
Don't - pass it as a date value: always keep values in the most sensible datatype, rather than strings...
You looking for sympathy?
You'll find it in the dictionary, between sympathomimetic and sympatric
(Page 1788, if it helps)
|
|
|
|
|
Djay Hole wrote: web service language is c#
No web service is web service. It might be implemented in C# but that doesn't change anything.
Djay Hole wrote: exception string is not in good format my code
The web service expects a web service call with the data in the format that it expects. And you are not sending it that way. Figure out the correct format and send it that way.
|
|
|
|
|
Look into the DateTime ToString[^] method and the DateTime TryParseExact[^] methods.
Although you could just pass the Date or DateTime objects as is? Chances are it is compatible. But for the record, I'm assuming you're talking VB.Net?
|
|
|
|