Convert Base64 String to PDF

byte[] bytes = Convert.FromBase64String(richtextbox1.Text);

System.IO.FileStream stream = new FileStream(@”C:\\…pdf”, FileMode.CreateNew);

System.IO.BinaryWriter writer = new BinaryWriter(stream);

writer.Write(bytes, 0, bytes.Length);


Convert PDF to Base64 String

string pdfPath = @”C:\\…pdf”;

byte[] pdfBytes = File.ReadAllBytes(pdfPath);

string pdfBase64 = Convert.ToBase64String(pdfBytes);

richtextbox1.Text = pdfBase64;

Get ConnectionString from App.config

Dim connections As ConnectionStringSettingsCollection = ConfigurationManager.ConnectionStrings

If connections.Count <> 0 Then

For Each connection As ConnectionStringSettings In connections

Dim name As String = connection.Name

Dim provider As String = connection.ProviderName

Dim connectionString As String = connection.ConnectionString



End If