Click here to Skip to main content
14,767,943 members
Home » Discussions » C#
   

C#

 
AnswerRe: How to create a self-extractor use ICSharpCode Pin
Christian Graus17-Jun-09 17:30
protectorChristian Graus17-Jun-09 17:30 
GeneralRe: How to create a self-extractor use ICSharpCode Pin
Oliver Misear17-Jun-09 17:44
MemberOliver Misear17-Jun-09 17:44 
GeneralRe: How to create a self-extractor use ICSharpCode Pin
Christian Graus17-Jun-09 18:37
protectorChristian Graus17-Jun-09 18:37 
AnswerRe: How to create a self-extractor use ICSharpCode Pin
Super Lloyd17-Jun-09 18:34
MemberSuper Lloyd17-Jun-09 18:34 
QuestionUsing a c# DLL in VS2005 Pin
Jasmine Pomelo17-Jun-09 16:30
MemberJasmine Pomelo17-Jun-09 16:30 
AnswerRe: Using a c# DLL in VS2005 Pin
Christian Graus17-Jun-09 17:04
protectorChristian Graus17-Jun-09 17:04 
QuestionHow to find out if managed DirectX is installed? Pin
tjeffries17-Jun-09 16:14
Membertjeffries17-Jun-09 16:14 
QuestionAny C# Gurus know how to handle this bad boy?.. Pin
Paul Calabro17-Jun-09 14:07
MemberPaul Calabro17-Jun-09 14:07 
It's suppose to login to this site here:http://www.govconnection.com
The problem is it gets redirected..
I have NO clue on this one.
I'm hoping someone's talented enough to handle this.


public void loginToSite()
        {
            string formUrl = "http://www.govconnection.com/IPA/Account/Login.htm"; // NOTE: This is the URL the form POSTs to, not the URL of the form (you can find this in the "action" attribute of the HTML's form tag
            string formParams = "__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJNjYxOTQ0NzIyD2QWAmYPZBYCAgYQFgIeCG9uc3VibWl0BRxyZXR1cm4gQ29tcGxldGVBc3luY0NhbGxzKCk7ZBYCAgcPDxYEHghDc3NDbGFzcwUNc2l0ZUNvbnRhaW5lch4EXyFTQgICZBYEAgEPDxYEHwEFI2ZhdXhDb2x1bW5XcmFwIGNsZWFyIHdpdGhCYWNrZ3JvdW5kHwICAmQWAgIBDw8WBB8BBQdjb250ZW50Hw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JhY2tncm91bmQtaW1hZ2U6dXJsKC9%2BL21lZGlhL0ltYWdlcy9OYXYvUENDR09WL3RhZ2xpbmUuYXNoeCk7FgQCAQ8WAh8IBQ0vSVBBL0hvbWUuaHRtFgJmDw8WAh8GBSQvfi9tZWRpYS9JbWFnZXMvTmF2L1BDQ0dPVi9sb2dvLmFzaHhkZAIFD2QWBAICDxYCHgpvbmtleXByZXNzBTxyZXR1cm4gc2VhcmNoS2V5RG93bihldmVudCwgJy9JUEEvU2hvcC9Qcm9kdWN0L1NlYXJjaC5odG0nKTtkAgMPFgIeB29uY2xpY2sFdXNfb2JqZWN0SUQgPSAnc2VhcmNoR29CdXR0b24nO3MudGwodGhpcywnbycsc19vYmplY3RJRCk7IGV4ZWN1dGVTZWFyY2goJy9JUEEvU2hvcC9Qcm9kdWN0L1NlYXJjaC5odG0nKTsgcmV0dXJuIGZhbHNlOxYCZg8PFgIfBgUbL1NraW5zL1BDQ0dPVi9pbWFnZXMvZ28uZ2lmZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgMFF2N0bDAwJGdyb3VwRHJvcGRvd25MaXN0BSljdGwwMCRDb250ZW50JGN0bDAwJHJlbWVtYmVyTG9naW5DaGVja0JveAUkY3RsMDAkQ29udGVudCRjdGwwMCRsb2dpbkltYWdlQnV0dG9u&ctl00%24Content%24ctl04=0&ctl00%24Content%24ctl00%24emailAddressTextBox=EMAILGOESHERE&ctl00%24Content%24ctl00%24passwordTextBox=PASSWORDGOESHERE&ctl00%24Content%24ctl00%24loginImageButton.x=0&ctl00%24Content%24ctl00%24loginImageButton.y=0&ctl00%24_leftColumn%24ctl00=&ctl00%24_header%24txtProductSearch=Item%23%2C+MFG%23+or+Keyword";
            string cookieHeader;
            System.Net.HttpWebRequest req = (HttpWebRequest)System.Net.WebRequest.Create(formUrl);
            req.AllowAutoRedirect = true;
            req.ContentType = "application/x-www-form-urlencoded";
            req.Method = "POST";
            byte[] bytes = Encoding.ASCII.GetBytes(formParams);
            req.ContentLength = bytes.Length;
            using (Stream os = req.GetRequestStream())
            {
                os.Write(bytes, 0, bytes.Length);
            }
            WebResponse resp = req.GetResponse();

            StreamReader sr = new StreamReader(resp.GetResponseStream());
            String result = sr.ReadToEnd();
            MessageBox.Show(result);
            cookieHeader = resp.Headers["Set-cookie"];
        }

AnswerRe: Any C# Gurus know how to handle this bad boy?.. Pin
Christian Graus17-Jun-09 14:40
protectorChristian Graus17-Jun-09 14:40 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Paul Calabro17-Jun-09 15:16
MemberPaul Calabro17-Jun-09 15:16 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Colin Angus Mackay17-Jun-09 15:26
MemberColin Angus Mackay17-Jun-09 15:26 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Christian Graus17-Jun-09 15:49
protectorChristian Graus17-Jun-09 15:49 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Colin Angus Mackay17-Jun-09 16:03
MemberColin Angus Mackay17-Jun-09 16:03 
AnswerRe: Any C# Gurus know how to handle this bad boy?.. Pin
Colin Angus Mackay17-Jun-09 15:34
MemberColin Angus Mackay17-Jun-09 15:34 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Paul Calabro17-Jun-09 16:02
MemberPaul Calabro17-Jun-09 16:02 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Colin Angus Mackay17-Jun-09 16:10
MemberColin Angus Mackay17-Jun-09 16:10 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Paul Calabro17-Jun-09 16:23
MemberPaul Calabro17-Jun-09 16:23 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Paul Calabro17-Jun-09 16:24
MemberPaul Calabro17-Jun-09 16:24 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Colin Angus Mackay17-Jun-09 22:30
MemberColin Angus Mackay17-Jun-09 22:30 
GeneralRe: Any C# Gurus know how to handle this bad boy?.. Pin
Paul Calabro18-Jun-09 5:27
MemberPaul Calabro18-Jun-09 5:27 
QuestionUpgrade Microsoft Visual C# 2008 Express Edition to Visual Studio? Pin
Mc_Topaz17-Jun-09 11:30
MemberMc_Topaz17-Jun-09 11:30 
AnswerRe: Upgrade Microsoft Visual C# 2008 Express Edition to Visual Studio? Pin
EliottA17-Jun-09 11:33
MemberEliottA17-Jun-09 11:33 
GeneralRe: Upgrade Microsoft Visual C# 2008 Express Edition to Visual Studio? Pin
Mc_Topaz17-Jun-09 11:44
MemberMc_Topaz17-Jun-09 11:44 
AnswerRe: Upgrade Microsoft Visual C# 2008 Express Edition to Visual Studio? Pin
I Believe In GOD17-Jun-09 11:34
MemberI Believe In GOD17-Jun-09 11:34 
GeneralRe: Upgrade Microsoft Visual C# 2008 Express Edition to Visual Studio? Pin
Mc_Topaz17-Jun-09 11:45
MemberMc_Topaz17-Jun-09 11:45 

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.