asp.net mvc - Consecutive AJAX Posts C# MVC -
I am trying to post continuously through AJAX, but do not post it for the second time, I think that The page does not reload this post from different cells in a table and goes to different functions and everything is located in the MVC section where I render everything.
I am working in MVC and this is my view where the posts are.
First post:
& lt; Tr & gt; Using @Ajax.Beniform ("Change Contact Information", Null, New Ajax Option {updateTargetId = "profileTable"}, FormMath.post) () @ Html.TextBoxFor (x = & gt; X.CurrentUser.ContactInformation, new {name = "ContactInformation"}) button type = "submit"> Spara } & lt; / Tr second post:
& lt; tr & gt; @ (Ajax.Benfinform ("Change support message", blank, new Ajax Option {UpdateTargetId = "profileTable"}, FormMath.post)} {& lt; td & gt; @ Html.TextBoxFor (x = & gt; x.CurrentUser.ContactInformation, new {name = "TemporaryMessage"}) & lt; button Type = "submit"> Spara }
Here is the controller: Public settings change time (string temporary message) {var model = (profile block view model) session ["model"]; connectionhell.changedmemory message (temporary message, model. Current user .USIRID); Return Redirect Action ("Index", Model); } [Http post] Public Action Result Change Contact Information (String Contact Information) {var model = (Profile block view model) session ["Model"]; Connection hanger Change signal information (contact information, model current user.USIDID); Return Redirect Action ("Index", Model); }
Then the first job works perfectly, but the problem is that after that post, more data is updated, I can not post to others or even before I can post - no continuous post is allowed, which is what I need.
Can anybody get it anyway?
Thanks in advance!
DSX
<
I turned it into this view
& lt; Tr & gt; @ (Ajax.Benfinform ("Change Support Message", blank, new Ajax option {UpdateTargetId = "profileTable"}, FormMeth.post) {& lt; Td> @ Html.TextBoxFor (x => x.CurrentUser.ContactInformation, new {name = "TemporaryMessage"}) & lt; Button type = "submit" & gt; Spara & lt; / Button & gt; & Lt; / TD & gt; } & Lt; / Tr & gt;
To do this:
& lt; Td> @ (Ajax. Bangform ("temporary message", "request of temporary message", blank, new Ajax option, {UpdateTargetId = "profileTable"}, FormMethod.Post)) {@ Html.TextBoxFor (x => x. CurrentUser.TemporaryMessage, new {Name = "TemporaryMessage"}) & Lt; Button type = "submit"> Spara & lt; / Button & gt; } & Lt; / Td>
I asked it & lt; TD> tag, which was earlier.
Not sure why it is constantly posting, so if you know that I feel free to educate! :)
Regards / DSX
Comments
Post a Comment