Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7197223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:56:31+00:00 2026-05-28T20:56:31+00:00

I have a form in DoComment.ascx : <%@ Control Language=C# Inherits=System.Web.Mvc.ViewUserControl<DT.KazBilet.Objects.PublicationComment> %> <div class=wrap>

  • 0

I have a form in DoComment.ascx:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DT.KazBilet.Objects.PublicationComment>" %>
<div class="wrap">
    <h4>Comment</h4>
    <%using (Ajax.BeginForm("DoComment", "Publication", new {id = Model.Publication.OID, parentId = Model.OID},new AjaxOptions()))
      {%>    
    <%=Html.TextAreaFor(x=>x.Text) %>    
    <%-- <textarea style="width: 100%; height: 152px;"></textarea>--%>
    <input type="submit" value="Publish" class="btn ok_btn" />
    <%}%>
</div>

This is my controller’s action:

public JsonResult DoComment(PublicationComment model, int id, int parentId)
        {
            PublicationRepository.SaveComment(User.Identity.Name,id, parentId, model.Text);

            return Json(new {
                 Message = "You comment on moderation"
                 });
        }

I want that user clicks on Publish button then show popup window where will be written text from Message.
Can you help me(some code)?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:56:45+00:00Added an answer on May 28, 2026 at 8:56 pm

    You could subscribe to the OnSuccess javascript event in the AJAX options and then show the JSON result you have retrieved the way you like (new window, div, …):

    <% using (Ajax.BeginForm(
        "DoComment", 
        "Publication", 
        new { id = Model.Publication.OID, parentId = Model.OID },
        new AjaxOptions { OnSuccess = "onSuccess" })
    ) %>
    

    and then you would define the onSuccess javascript function. Depending on whether you use jQuery or MicrosoftAjax the implementation of this function might slightly vary and more specifically the way to retrieve the JSON result.

    For example if you are using MicrosoftAjax (obsolete now):

    var onSuccess = function(e) {
        var json = e.get_response().get_object();    
        alert(json.Message);
    };
    

    and if you are jQuery:

    var onSuccess = function(json) {
        alert(json.Message);
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this infoflyout.ascx <%@ Control Language=C# Inherits=System.Web.Mvc.ViewUserControl<dynamic> %> <script type=text/javascript> $(document).ready(function () {
I have a form with an embedded web browser control on it. I am
Picture the following situation. I have an XML document as follows, <Form> <Control Type=Text
I have a MVC, ASP.Net application and I want to create a dialog form.I
At the moment, I have this DIV with a registration form centered over the
I have a form + layout like so: <form ...> <div id=editor> [form html]
Hello i have this form filling javascript: function onLine(code,nn) { document.writeform.bericht.value+=code; document.writeform.bericht.focus(); document.writeform.nickname.value+=nn; write1();
function focus(element) { document.form.element.focus(); } I want to have a function to focus on
I have a form like this: <form id=loginCompact action=https://externalsite... name=sportsbook method=post onsubmit=createCookie('BRLOG', document.sportsbook.username.value, 1)>
I have a Delphi application that has a document browser as the main form.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.