Thursday 25 July 2013

Value Response Header Get Set Cookie In C#



var client = new HttpClient();
    client.MaxResponseContentBufferSize = Int32.MaxValue;
    HttpResponseMessage response = await client.GetAsync(new Uri("http://www.google.com"));
string j = (response.Headers.ToString());
    IList<string> valu = j.Split(' ').Reverse().ToList<string>();
    for (int i = 0; i < j.Length; i++)
    {      
        if (valu[i].StartsWith("JSESSIONID"))//if Set-Cookie
        {
            var s = valu[i];
            char[] delimiters = new[] { ',', ';', ' ' };  // List of your delimiters
            var splitte = s.Split(delimiters, StringSplitOptions.RemoveEmptyEntries);
            s = splitte[0].Replace("JSESSIONID=", "");        
        }
    }

Tuesday 23 July 2013

Add dll to gac in windows 8 using Command Prompt(normal in administrative mode)


Set Focus State Code

TextBox1.Focus(Windows.UI.Xaml.FocusState.Pointer);

Wednesday 17 July 2013

ADDING STRONG NAME TO EXISTING DLL IN VS 2010

code :

Setting environment for using Microsoft Visual Studio 2010 x86 tools

Step 1 : Run visual studio command prompt and go to directory where your DLL located.

  For Example my DLL located in D:/Test.dll

Step 2 : Now create il file using below command.

  D:/> ildasm /all /out=Test.il Test.dll 
  (this command generate code library)

Step 3 : Generate new Key for sign your project.

  D:/> sn -k mykey.snk

Step 4 : Now sign your library using ilasm command.

  D:/> ilasm /dll /key=mykey.snk Test.il

so after this step your assembly contains strong name and signed. 


example done successfully :


C:\>ildasm /all /out=eCOS_ConnSharepoint.il eCOS_ConnSharepoint.dll

C:\>sn -k mykey.snk

Microsoft (R) .NET Framework Strong Name Utility  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Key pair written to mykey.snk

C:\>ilasm /dll /key=mykey.snk eCOS_ConnSharepoint.il

Microsoft (R) .NET Framework IL Assembler.  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.
Assembling 'eCOS_ConnSharepoint.il'  to DLL --> 'eCOS_ConnSharepoint.dll'
Source file is ANSI

Assembled method eCOS_ConnSharepoint.eCOS_fileLoader::UploadFileToDocLib
Assembled method eCOS_ConnSharepoint.eCOS_fileLoader::.ctor
Creating PE file

Emitting classes:
Class 1:        eCOS_ConnSharepoint.eCOS_fileLoader

Emitting fields and methods:
Global
Class 1 Methods: 2;

Emitting events and properties:
Global
Class 1
Writing PE file
Signing file with strong name
Operation completed successfully

C:\>gacutil.exe /i c:\eCOS_ConnSharepoint.dll
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache

Tuesday 16 July 2013

Enter Click Login Button Press Event occur in Password box

code:

 private void pwd_KeyDown(object sender, KeyRoutedEventArgs e)
        {        
            if (e.Key == Windows.System.VirtualKey.Enter)
            {
                loginclick_Click(this, new RoutedEventArgs());
            }

        }

Monday 8 July 2013

learn data bind to buttons and more tutorial

 1st lesson

2nd lesson

3rd lesson

4th lesson

5th lesson

Splash Screen Working Example with video inside it windows 8 c#

Just run the code and see app.xaml.cs splash page and mainpage
splash screen windows 8 c#

https://docs.google.com/file/d/0B75nbNO58O7dS2RsbmFfQWFSLWc/edit?usp=sharing

to navigate from main page use this code

 var frame = new Frame();
    frame.Navigate(typeof(BlankPage1));
    Window.Current.Content = frame;

Friday 5 July 2013

Using the Microsoft Ad SDK in Windows 8

Using the Microsoft Ad SDK in Windows 8: One of the best ways to make money with Windows 8 is to display ads in your Windows Store app using the Microsoft Advertising SDK.
Here’s... Start by downloading and installing the Microsoft Advertising SDK

http://go.microsoft.com/?linkid=9815330

Windows 8 apps Flyout,json parse etc Sample Example Application

Winrt Windows 8 apps Flyout,json parse etc sample example code below for u to view

Chart xaml

for help call chennai no +91 9952970028
mainpage navigates to all pages check it out if u find update please do post


https://docs.google.com/file/d/0B75nbNO58O7da3lkeVBLMUJPc0U/edit?usp=sharing