Click here to Skip to main content
15,356,336 members
Home / Discussions / C#
   

C#

 
QuestionRe: Private chat Pin
ZurdoDev11-Jul-14 1:49
professionalZurdoDev11-Jul-14 1:49 
QuestionButton within a gridvew that clicking opens a form Pin
Member 1092277510-Jul-14 5:01
MemberMember 1092277510-Jul-14 5:01 
AnswerRe: Button within a gridvew that clicking opens a form Pin
Mycroft Holmes10-Jul-14 14:22
professionalMycroft Holmes10-Jul-14 14:22 
QuestionProblem Encode Base 64 Pin
KaKoten10-Jul-14 2:42
MemberKaKoten10-Jul-14 2:42 
AnswerRe: Problem Encode Base 64 Pin
OriginalGriff10-Jul-14 2:59
mveOriginalGriff10-Jul-14 2:59 
GeneralRe: Problem Encode Base 64 Pin
KaKoten10-Jul-14 18:03
MemberKaKoten10-Jul-14 18:03 
GeneralRe: Problem Encode Base 64 Pin
Dave Kreskowiak10-Jul-14 18:16
mveDave Kreskowiak10-Jul-14 18:16 
GeneralRe: Problem Encode Base 64 Pin
KaKoten10-Jul-14 19:00
MemberKaKoten10-Jul-14 19:00 
this is the code, the problem still to same like above ??


//this function Convert to Encord your Password 
public static string EncodePasswordToBase64(string password) 
{
   try 
   {
      byte[] encData_byte = new byte[password.Length]; 
      encData_byte = System.Text.Encoding.UTF8.GetBytes(password); 
      string encodedData = Convert.ToBase64String(encData_byte); 
      return encodedData; 
   } 
   catch (Exception ex) 
   { 
      throw new Exception("Error in base64Encode" + ex.Message); 
   } 
} //this function Convert to Decord your Password
public string DecodeFrom64(string encodedData) 
{
   System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding(); 
   System.Text.Decoder utf8Decode = encoder.GetDecoder();
   byte[] todecode_byte = Convert.FromBase64String(encodedData); 
   int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length); 
   char[] decoded_char = new char[charCount]; 
   utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0); 
   string result = new String(decoded_char); 
   return result;
}
protected void Button1_Click(object sender, EventArgs e)
{ 
   Label1.Text=EncodePasswordToBase64(TextBox1.Text); 
}
protected void Button2_Click(object sender, EventArgs e)
{
   Label1.Text = DecodeFrom64(Label1.Text);}

GeneralRe: Problem Encode Base 64 Pin
Bernhard Hiller10-Jul-14 21:07
MemberBernhard Hiller10-Jul-14 21:07 
GeneralRe: Problem Encode Base 64 Pin
Dave Kreskowiak11-Jul-14 1:31
mveDave Kreskowiak11-Jul-14 1:31 
GeneralRe: Problem Encode Base 64 Pin
KaKoten12-Jul-14 15:40
MemberKaKoten12-Jul-14 15:40 
QuestionCombobox.SelectedValue and Combobox.Text Pin
JCompiler10-Jul-14 1:45
MemberJCompiler10-Jul-14 1:45 
AnswerRe: Combobox.SelectedValue and Combobox.Text Pin
Mycroft Holmes10-Jul-14 14:25
professionalMycroft Holmes10-Jul-14 14:25 
GeneralRe: Combobox.SelectedValue and Combobox.Text Pin
JCompiler10-Jul-14 23:39
MemberJCompiler10-Jul-14 23:39 
AnswerRe: Combobox.SelectedValue and Combobox.Text Pin
Dilan Shaminda14-Jul-14 7:43
professionalDilan Shaminda14-Jul-14 7:43 
QuestionC# Pin
livhuone9-Jul-14 23:04
Memberlivhuone9-Jul-14 23:04 
AnswerRe: C# Pin
OriginalGriff9-Jul-14 23:41
mveOriginalGriff9-Jul-14 23:41 
AnswerRe: C# Pin
Richard MacCutchan9-Jul-14 23:43
mveRichard MacCutchan9-Jul-14 23:43 
QuestionReading and writing from a List<string> simultaneously Pin
Retro6179-Jul-14 16:06
MemberRetro6179-Jul-14 16:06 
AnswerRe: Reading and writing from a List<string> simultaneously Pin
Dave Kreskowiak9-Jul-14 18:50
mveDave Kreskowiak9-Jul-14 18:50 
QuestionAutoUpdater c# wpf xmal Pin
EvilRevenger9-Jul-14 14:29
MemberEvilRevenger9-Jul-14 14:29 
AnswerRe: AutoUpdater c# wpf xmal Pin
Pete O'Hanlon9-Jul-14 20:05
mvaPete O'Hanlon9-Jul-14 20:05 
AnswerRe: AutoUpdater c# wpf xmal Pin
GuyThiebaut10-Jul-14 3:29
professionalGuyThiebaut10-Jul-14 3:29 
GeneralRe: AutoUpdater c# wpf xmal Pin
Dave Kreskowiak10-Jul-14 3:45
mveDave Kreskowiak10-Jul-14 3:45 
GeneralRe: AutoUpdater c# wpf xmal Pin
GuyThiebaut10-Jul-14 3:57
professionalGuyThiebaut10-Jul-14 3:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.