|
Mark Nischalke wrote: msg.BodyFormat = MailFormat.Html;
I don't have BodyFormat at msg object... 
|
|
|
|
|
It's a property on the MailMessage class, what do you mean you don't have it?
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: It's a property on the MailMessage class, what do you mean you don't have it?
This is what i get on the line-
msg.BodyFormat = MailFormat.Html;
Cannot implicitly convert type 'string' to 'System.Net.Mail.MailAddress'
'System.Net.Mail.MailMessage' does not contain a definition for 'BodyFormat' and no extension method 'BodyFormat' accepting a first argument of type 'System.Net.Mail.MailMessage' could be found (are you missing a using directive or an assembly reference?)
'MailFormat' does not exist in the current context
|
|
|
|
|
My fault the namespace should be System.Net.Mail, not System.Web.Mail and use IsBodyHtml = true
only two letters away from being an asset
|
|
|
|
|
thanks,
can you please tell me how i open this at a new outlook mail?
|
|
|
|
|
Hello to all!
I want to implement in C# the RSA algorithm to encrypt and decrypt some data. I've studiet a lot already about this algorithm, but the only thing that I don't understand how to work with very big numbers in C#, even in C++ or C.
The problem is, that in our days, the recommended minimal lenght of the RSA key is 1024 bits. So, the algorithm says:
* n = pq, where p and q are distinct primes.
* phi, φ = (p-1)(q-1)
* e < n such that gcd(e, phi)=1
* d = e-1 mod phi.
* c = me mod n, 1<m<n.
*="" m="cd" mod="" n.
this="" was="" taken="" from="" here:="" http:="" www.di-mgt.com.au="" rsa_alg.html#note1
so,="" the="" keys="" are="" combination:
cpub="(e," n);
cpriv="(d," n);
well,="" ok,="" lets="" say="" for="" example="" that="" we="" generate="" some="" numbers="" and="" obtain="" keys:
public="" key:="" 3,9312243439
private="" 6208033627,9312243439
the="" algorith="" says="" to="" encrypt="" data,="" you="" need="" do:
c="(m" at="" power="" e)="" then="" do="" (mod="" n),="" or="" in="" c#="" like:="" c="(Math.Pow(m," e))="" %="" n;
to="" decrypt="" data:
m="(C" d)="" d))="" n;
so,="" form="" here="" question:
<b="">How to raise a message, lets say the encrypted '10' to our d, that is 6208033627, to obtain the original message?
And after all, our d is only 33 bits length? Tha maximal System.Double value is some 10 at the 308 power.
What I don't understand? What I'm missing? Can anyone explain me this?
I will apreciate your explanation! Thank you in advance!
|
|
|
|
|
To do anything like these operations in practically any language in use today you will need to get, or write your own, 'big number library'.
There are several around for the .NET languages and a quick Google will find most of them. Be warned though, some are better than others, you'll have to try them, to find one that suits.
I understand that .NET 4.0 has one built in.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
So, the main idea is that really the numbers are raised to a power of 1024 bits? Huh, then this is a problem...
|
|
|
|
|
Hi All
I have loaded 3tabes to my application. after the work is done, I wasnt to save it all.
using foreach(is there a better way?) I recreated from my different class objects 3 datatables.
now I have the tables, I think I added them to new ds
DataSet ds= new DataSet();
ds.Tables.Add(emp);
ds.Tables.Add(managers);
ds.Tables.Add(empToManagers);
did I do it write?
no my main question: in my db , I have 3 tables. some of the lines has been changed, deleted or some lines are new. what is the best way to update the db, without checking every line my self, I tried and got lost with the sql.
someone tokd me I can use adapter, but how?
(when I open th data, It is easy to se adapter
public DataSet GetDataSet(string tblName, string sql, DataSet ds)
{
adapter.SelectCommand.CommandText = sql;
adapter.Fill(ds, tblName);
return ds;
}
)
tnx
|
|
|
|
|
|
hi
i have sqlCE DataBase, i have Tdate field (datetime)
i notice that his format is: MM/DD/YYYY
in my C# program i work with date in: DD/MM/YYYY format.
how i can insert to my sqlCE data base my C# format ?
thank's in advance
|
|
|
|
|
Simple answer, you don't. The database actually stores the date (and time) as a number, not in any format. You need to do the formatting within your application.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Dates don't have a specific format.
One simply writes the value "as date" to a "date field" in the database. It will be saved in a format-independent way. It's formatted as soon as you look at it. Thus, you should format the data after reading from the database, as soon as you display it.
I are Troll
|
|
|
|
|
hi everyone,
i am pursuing my btech
so i got to do a project in csharp or asp.net.
i want to do a project that is somthing new,and i cant judge one.
please can anyone suggest me some project that is purposefull
|
|
|
|
|
srichakram_harsha wrote: please can anyone suggest me some project that is purposefull
No. I'm not trying to be cruel to you here, but this is for you to do, and it has to be something that engages your interest and you are capable of completing. I don't know you, so I can't offer any sensible advice on a topic that will keep you motivated when developing, and I don't know what level the BTECH is aimed at, so I can't judge the skill level that will be required.
If I was to suggest something that was too basic, you could end up failing because it's too shallow, and if I suggest something that's too complex, then you won't complete it and you'll fail. Either way, I've done you no favours.
If I were you, I'd look for something that interests you, and that you have sufficient knowledge in already that you don't have to waste unnecessary time researching the topic beforehand.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I know what would be really useful..
An image process application that handles live video stream from any source. Your application will then be able to detect the face of any person in shot and then identify that person by comparing data with a database. This database should contain information stating the security threat of each person and an alert should be made when a person with a high security threat is detected.
Additional, any data detected that is not present in the database should be stored along with a flag that allows a user to go though a list of unidentified people and then choose a further action to take such as providing a name for the person etc.
When you have finished, make sure you create an article on it and submit the source for all to use.
Good Luck!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
For the win, you could call it the "Technological Empirical Real-time Radical Identification, Sensoring and Trapping System". or TERRISTS for short.
|
|
|
|
|
Then we have a complete package
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
TERRISTS? Aren't they people who live on Terra (i.e. Earth)?
|
|
|
|
|
hi
what is the best and the short way to limit textbox for only numbers
(in C#)
thank's
|
|
|
|
|
Make a usercontrol and restrict user to type alphas..amd use it wherever u want..
|
|
|
|
|
|
It depends on what you mean by only numbers. I wrote this one[^], it allows digits only - no negative sign, number separators, currency symbols... just numbers
|
|
|
|
|
Since they're so commonly needed, I have a handy collection of things like signed int, unsigned int, signed float, unsigned float, which do all the validation needed. (Unfortunately it's company code, so I can't give you the source, but they're based on similar ideas to the article linked above.)
It's definitely worth making these once so you'll never be stuck for one again.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Hi All,
How can i change the startup mode for services that are already installed in machine using C# code.
i tried using ServiceController class in C# but i was not able to find any method to change the start up method for services that are already installed.
Thanks in advance
|
|
|
|