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 3845026
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T16:10:50+00:00 2026-05-19T16:10:50+00:00

i want to partialrender some control for example. her my code: <script type=text/javascript> $(#datetime).datepicker({

  • 0

i want to partialrender some control for example.
her my code:

<script type="text/javascript">

        $("#datetime").datepicker({ dateFormat: 'dd.mm.yy', onSelect: function (dateText, inst) {
            $.ajax({
                type: 'POST',
                data:
                {
                    datetime: dateText
                },
                url: '<%= VirtualPathUtility.ToAbsolute("~/ExcelToHtml") %>',
                async: true,
                success: function (response) { $('#report').html(response) }
            });
        }
        });
</script>
<div id="report">   
</div>

here server code:

public PartialViewResult ExcelToHtml(DateTime datetime) {
        ViewData["datetime"] = datetime;
        return PartialView("ExcelToHtml");
    }

now, i want to see my date, in div(id=report), but i dont see it.
thats just example, can not understand where am i wrong?

and the control ExcelToHtml.ascx:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<% ViewData["datetime"].ToString(); %>
  • 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-19T16:10:51+00:00Added an answer on May 19, 2026 at 4:10 pm

    Firstly, I just wanted to point out that you don’t need to specify the view name when it is the same as the action name…

    public PartialViewResult ExcelToHtml(DateTime datetime) {
        ViewData["datetime"] = datetime;
        return PartialView();
    }
    

    Secondly, to check your mechanism works, just put a placeholder on the partial view with nothing else…

    <p>Hello World</p>
    

    I think that it is likely that you will see “Hello World” loaded into the div.

    This leads onto the next point – can you share the code for the view – as I think the error is most likely to be in there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

want to query below xml <courseList filedUnder=Courses> <category code=4wd title=4wd Operation> <product code=lr title=4wd
Want to get current datetime to insert into lastModifiedTime column. I am using MySQL
want to know why String behaves like value type while using ==. String s1
So we have an f:event: <f:metadata> <f:event type=preRenderView listener=#{dashboardBacking.loadProjectListFromDB}/> </f:metadata> Which is triggered as
Want to know what the stackoverflow community feels about the various free and non-free
Want my FireFox at work to be in sync with my FireFox at my
Want to edit things like DIV size, color, positioning (absolute), height/width etc.
Want to create web sites with data on Dynamics AX. We want not to
Want to add a nice multiple image upload feature to a site so I
want to have a Hyperlink-Button in a gridView in which I can display a

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.