Click here to Skip to main content
15,881,882 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Full crud operation in ASP.NET in a single page with dropdownlist, radio button and checkbox controls Pin
Richard MacCutchan31-Oct-16 1:41
mveRichard MacCutchan31-Oct-16 1:41 
AnswerRe: Full crud operation in ASP.NET in a single page with dropdownlist, radio button and checkbox controls Pin
ZurdoDev31-Oct-16 1:54
professionalZurdoDev31-Oct-16 1:54 
QuestionView to Controller - HTML form POST action failing, with wrong Requested URL Pin
Member 1282452930-Oct-16 21:27
Member 1282452930-Oct-16 21:27 
AnswerRe: View to Controller - HTML form POST action failing, with wrong Requested URL Pin
Richard Deeming31-Oct-16 4:10
mveRichard Deeming31-Oct-16 4:10 
QuestionHow to show/hide textboxes based on what is selected via toggle switch Pin
Bootzilla3328-Oct-16 6:37
Bootzilla3328-Oct-16 6:37 
AnswerRe: How to show/hide textboxes based on what is selected via toggle switch Pin
Richard Deeming28-Oct-16 7:12
mveRichard Deeming28-Oct-16 7:12 
QuestionHow do I insert a toggle switch value into sql database Pin
Bootzilla3326-Oct-16 19:07
Bootzilla3326-Oct-16 19:07 
AnswerRe: How do I insert a toggle switch value into sql database Pin
Richard Deeming27-Oct-16 2:15
mveRichard Deeming27-Oct-16 2:15 
QuestionHow to submit a record and send as an email attachment at once? Pin
samflex26-Oct-16 9:43
samflex26-Oct-16 9:43 
AnswerRe: How to submit a record and send as an email attachment at once? Pin
ZurdoDev26-Oct-16 9:49
professionalZurdoDev26-Oct-16 9:49 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex26-Oct-16 10:34
samflex26-Oct-16 10:34 
AnswerRe: How to submit a record and send as an email attachment at once? Pin
ZurdoDev26-Oct-16 11:49
professionalZurdoDev26-Oct-16 11:49 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex26-Oct-16 15:32
samflex26-Oct-16 15:32 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
ZurdoDev26-Oct-16 15:42
professionalZurdoDev26-Oct-16 15:42 
AnswerRe: How to submit a record and send as an email attachment at once? Pin
jkirkerx26-Oct-16 13:33
professionaljkirkerx26-Oct-16 13:33 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex26-Oct-16 15:41
samflex26-Oct-16 15:41 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
jkirkerx27-Oct-16 7:06
professionaljkirkerx27-Oct-16 7:06 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex27-Oct-16 8:12
samflex27-Oct-16 8:12 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
jkirkerx27-Oct-16 11:36
professionaljkirkerx27-Oct-16 11:36 
GeneralRe: How to submit a record and send as an email attachment at once? Pin
samflex27-Oct-16 15:11
samflex27-Oct-16 15:11 
QuestionPOST xml request to an API with feedback asp.net mvc Pin
MacroSss21-Oct-16 0:11
MacroSss21-Oct-16 0:11 
AnswerRe: POST xml request to an API with feedback asp.net mvc Pin
jkirkerx24-Oct-16 9:15
professionaljkirkerx24-Oct-16 9:15 
AnswerRe: POST xml request to an API with feedback asp.net mvc Pin
MacroSss26-Oct-16 1:23
MacroSss26-Oct-16 1:23 
The first problem was solved this way

C#
public async Task<ActionResult> Test()
        {
            var parameters = new List<KeyValuePair<string, string>>
            {
                new KeyValuePair<string, string>("login", ""),
                new KeyValuePair<string, string>("password", ""),
            };

            var data = new FormUrlEncodedContent(parameters);

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://ekinobilet.ru/ekbs/upload.aspx");
            request.Method = "POST";

            byte[] dataArray = await data.ReadAsByteArrayAsync();
            request.ContentLength = dataArray.Length;
            request.ContentType = "application/x-www-form-urlencoded";

            var dataStream = await request.GetRequestStreamAsync();
            dataStream.Write(dataArray, 0, dataArray.Length);
            dataStream.Close();

            var resp = await request.GetResponseAsync();
            dataStream = resp.GetResponseStream();

            Stream receiveStream = resp.GetResponseStream();
            StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8);
            var responseText = readStream.ReadToEnd();

            StringBuilder output = new StringBuilder();
            XmlReader reader = XmlReader.Create(new StringReader(responseText));
            {
                reader.ReadToFollowing("list");
                reader.MoveToFirstAttribute();
                string count = reader.Value;
                output.AppendLine(count);
                string size = reader.Value;
                output.AppendLine(size);
                string file = reader.Value;
                output.AppendLine(file);
                string name = reader.Value;
                output.AppendLine(name);
            }
            ViewBag.list = output.ToString();

            return View(responseText);

GeneralRe: POST xml request to an API with feedback asp.net mvc Pin
MacroSss26-Oct-16 1:24
MacroSss26-Oct-16 1:24 
QuestionThere is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'SelectedClientList'. Pin
amioni20-Oct-16 1:43
amioni20-Oct-16 1:43 

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.