Click here to Skip to main content
15,880,469 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow create a cross domain web api? Pin
miss7861-Apr-15 3:49
miss7861-Apr-15 3:49 
AnswerRe: How create a cross domain web api? Pin
Afzaal Ahmad Zeeshan2-Apr-15 1:35
professionalAfzaal Ahmad Zeeshan2-Apr-15 1:35 
AnswerRe: How create a cross domain web api? Pin
jkirkerx3-Apr-15 7:30
professionaljkirkerx3-Apr-15 7:30 
QuestionAbsolutely lost with starting asp.net mvc Pin
Frygreen31-Mar-15 23:20
Frygreen31-Mar-15 23:20 
AnswerRe: Absolutely lost with starting asp.net mvc Pin
King Fisher1-Apr-15 0:18
professionalKing Fisher1-Apr-15 0:18 
GeneralRe: Absolutely lost with starting asp.net mvc Pin
Afzaal Ahmad Zeeshan1-Apr-15 1:14
professionalAfzaal Ahmad Zeeshan1-Apr-15 1:14 
GeneralRe: Absolutely lost with starting asp.net mvc Pin
King Fisher1-Apr-15 1:19
professionalKing Fisher1-Apr-15 1:19 
AnswerRe: Absolutely lost with starting asp.net mvc Pin
Afzaal Ahmad Zeeshan1-Apr-15 1:59
professionalAfzaal Ahmad Zeeshan1-Apr-15 1:59 
To your comment for that answer "Not Clear sir,I'm new to MVC.", please read that article I have attached.

The answer to that (sorry for going off-topic related to this thread), is that you need to send the information about your View and some other controls which were interacted through user. Which is a very common task in WPF, or Win Forms. If you view event handlers in those frameworks you find out this code,

C#
void button_Click(object sender, EventArgs e) {
   var button = sender as Button; // cast the object to Button
   var name = button.Name; // get the name of the button which triggered the function
}


In which, sender is the object which triggered this event. So, if you cast it to a Button object and so on.

In ASP.NET you do not get such functionality by default, which is why you have to create such functionality yourself. Which, in my opinion would be best to use native forms. Which get submitted (using action attribute) to their own pages for processing. So you can redirect the user to where you want him to be. This way, you will check for values that are related to the controller action; SignUp or SignIn. Do not complicate things, use the simplest method that can be used. It was also pointed out, that you're having variables for your HTTP GET handler, not HTTP POST. Use a model to establish similarity, or... You can use JavaScript to control how things are handled on the client (handling click on SignIn or SignUp).

Also what he tried to tell you was same, that you were having the member profileList inside your GET handler, but not inside the POST handler, where as once the form was to be submitted, it was using the POST handler action, so there was a mismatch between the ViewBags and thus caused this problem. That is why he suggested that you use a Model.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: Absolutely lost with starting asp.net mvc Pin
Frygreen2-Apr-15 3:45
Frygreen2-Apr-15 3:45 
GeneralRe: Absolutely lost with starting asp.net mvc Pin
King Fisher2-Apr-15 5:01
professionalKing Fisher2-Apr-15 5:01 
AnswerRe: Absolutely lost with starting asp.net mvc Pin
Afzaal Ahmad Zeeshan1-Apr-15 1:13
professionalAfzaal Ahmad Zeeshan1-Apr-15 1:13 
AnswerRe: Absolutely lost with starting asp.net mvc Pin
RajeeshMenoth1-Apr-15 1:16
professionalRajeeshMenoth1-Apr-15 1:16 
GeneralRe: Absolutely lost with starting asp.net mvc Pin
Frygreen1-Apr-15 3:02
Frygreen1-Apr-15 3:02 
GeneralRe: Absolutely lost with starting asp.net mvc Pin
jkirkerx1-Apr-15 8:10
professionaljkirkerx1-Apr-15 8:10 
QuestionChance Textmode Date Format Pin
Praveen Kandari31-Mar-15 22:34
Praveen Kandari31-Mar-15 22:34 
GeneralRe: Chance Textmode Date Format Pin
King Fisher1-Apr-15 0:15
professionalKing Fisher1-Apr-15 0:15 
GeneralRe: Chance Textmode Date Format Pin
Praveen Kandari1-Apr-15 0:24
Praveen Kandari1-Apr-15 0:24 
GeneralRe: Chance Textmode Date Format Pin
King Fisher1-Apr-15 0:31
professionalKing Fisher1-Apr-15 0:31 
GeneralRe: Chance Textmode Date Format Pin
Praveen Kandari1-Apr-15 0:37
Praveen Kandari1-Apr-15 0:37 
GeneralRe: Chance Textmode Date Format Pin
King Fisher1-Apr-15 0:39
professionalKing Fisher1-Apr-15 0:39 
AnswerRe: Chance Textmode Date Format Pin
Richard Deeming1-Apr-15 1:11
mveRichard Deeming1-Apr-15 1:11 
GeneralRe: Chance Textmode Date Format Pin
Praveen Kandari1-Apr-15 1:24
Praveen Kandari1-Apr-15 1:24 
GeneralRe: Chance Textmode Date Format Pin
Richard Deeming1-Apr-15 1:29
mveRichard Deeming1-Apr-15 1:29 
GeneralRe: Chance Textmode Date Format Pin
Praveen Kandari1-Apr-15 1:37
Praveen Kandari1-Apr-15 1:37 
GeneralRe: Chance Textmode Date Format Pin
Richard Deeming1-Apr-15 1:39
mveRichard Deeming1-Apr-15 1:39 

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.