Click here to Skip to main content
15,890,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Asp.Net MVC View, Loading HTML in iframe element instead of src=url Pin
jkirkerx2-Jun-16 6:36
professionaljkirkerx2-Jun-16 6:36 
GeneralRe: Asp.Net MVC View, Loading HTML in iframe element instead of src=url Pin
jkirkerx2-Jun-16 8:26
professionaljkirkerx2-Jun-16 8:26 
GeneralRe: Asp.Net MVC View, Loading HTML in iframe element instead of src=url Pin
Richard Deeming2-Jun-16 8:37
mveRichard Deeming2-Jun-16 8:37 
GeneralRe: Asp.Net MVC View, Loading HTML in iframe element instead of src=url Pin
jkirkerx2-Jun-16 9:32
professionaljkirkerx2-Jun-16 9:32 
QuestionHelp with fileupload object Pin
turbosupramk31-Jun-16 6:03
turbosupramk31-Jun-16 6:03 
AnswerRe: Help with fileupload object Pin
Richard Deeming1-Jun-16 6:55
mveRichard Deeming1-Jun-16 6:55 
GeneralRe: Help with fileupload object Pin
turbosupramk31-Jun-16 7:39
turbosupramk31-Jun-16 7:39 
GeneralRe: Help with fileupload object Pin
Richard Deeming1-Jun-16 7:52
mveRichard Deeming1-Jun-16 7:52 
You'd have to use client-side code to initiate a post-back. For example:
ASP.NET
<asp:FileUpload runat="server" onchange="this.form.submit()" />

C#
protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack)
    {
        ProcessFileUpload();
    }
}


Background threads almost never make sense in ASP.NET, due to the way it works:
  1. The browser makes a request to the server;
  2. The server maps the request to a handler - in this case, you page;
  3. The server creates an instance of your page to handle the request;
  4. The page builds its control tree;
  5. If the request is a "post-back", the page rehydrates the control tree from the saved state sent in the request;
  6. The page runs through the event handlers, and renders an HTML document;
  7. The document is sent back to the client, and the page instance is destroyed;
  8. The client parses and displays the HTML document - this can involve making further requests, running Javascript, etc.

Between the initial request and a "post-back", code running on the server typically has no connection to the client.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Help with fileupload object Pin
turbosupramk31-Jun-16 8:07
turbosupramk31-Jun-16 8:07 
GeneralRe: Help with fileupload object Pin
Richard Deeming1-Jun-16 8:16
mveRichard Deeming1-Jun-16 8:16 
GeneralRe: Help with fileupload object Pin
turbosupramk31-Jun-16 9:21
turbosupramk31-Jun-16 9:21 
GeneralRe: Help with fileupload object Pin
Richard Deeming2-Jun-16 1:46
mveRichard Deeming2-Jun-16 1:46 
GeneralRe: Help with fileupload object Pin
turbosupramk32-Jun-16 2:43
turbosupramk32-Jun-16 2:43 
GeneralRe: Help with fileupload object Pin
Richard Deeming2-Jun-16 2:45
mveRichard Deeming2-Jun-16 2:45 
GeneralRe: Help with fileupload object Pin
turbosupramk32-Jun-16 4:00
turbosupramk32-Jun-16 4:00 
GeneralRe: Help with fileupload object Pin
Richard Deeming2-Jun-16 4:24
mveRichard Deeming2-Jun-16 4:24 
GeneralRe: Help with fileupload object Pin
turbosupramk32-Jun-16 4:28
turbosupramk32-Jun-16 4:28 
GeneralRe: Help with fileupload object Pin
Richard Deeming2-Jun-16 4:31
mveRichard Deeming2-Jun-16 4:31 
GeneralRe: Help with fileupload object Pin
turbosupramk32-Jun-16 8:42
turbosupramk32-Jun-16 8:42 
Questionaccessing Local IP camera Pin
Member 1062117328-May-16 0:49
Member 1062117328-May-16 0:49 
AnswerRe: accessing Local IP camera Pin
Mycroft Holmes29-May-16 21:58
professionalMycroft Holmes29-May-16 21:58 
QuestionWhy is Panel visibility always showing false? Pin
samflex27-May-16 10:37
samflex27-May-16 10:37 
AnswerRe: Why is Panel visibility always showing false? Pin
F-ES Sitecore29-May-16 6:13
professionalF-ES Sitecore29-May-16 6:13 
GeneralRe: Why is Panel visibility always showing false? Pin
samflex29-May-16 16:51
samflex29-May-16 16:51 
GeneralRe: Why is Panel visibility always showing false? Pin
Richard MacCutchan29-May-16 21:27
mveRichard MacCutchan29-May-16 21:27 

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.