如何在 ASP.Net MVC 框架中使用 ajax 调用在 ASP.Net Charting 控件中使用 BinaryStreaming rendertype

发布于 2024-08-23 03:40:25 字数 437 浏览 4 评论 0原文

任何人都可以提供一个代码片段来解释如何使用 $.ajax 在 ASP.Net 图表控件中使用二进制流呈现类型调用ASP.Net MVC框架。

Ajax 调用将如下所示-->

$.ajax({              

    type: "POST",

    url: "/DrawChart/" + drawingParamter1+ "/" + drawingParamter2,

    dataType: someSuitableDataType,

    error: function(error) {

    },

    success: function(html) {

    }
});

Can anybody give a code snippet which will explain how to use Binary streaming render type in ASP.Net Charting controls using $.ajax call in ASP.Net MVC Framework. ?

Ajax call will look like this-->

$.ajax({              

    type: "POST",

    url: "/DrawChart/" + drawingParamter1+ "/" + drawingParamter2,

    dataType: someSuitableDataType,

    error: function(error) {

    },

    success: function(html) {

    }
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

属性 2024-08-30 03:40:25

我不确定为什么要使用ajax来调用二进制流,但是这篇博文向您展示了如何使用或使用控件来进行二进制流。

http://setiabud.blogspot.com/ 2010/02/using-aspnet-chart-controls-in-aspnet.html

I am not sure why do you want to use ajax to call a binary stream, but this blog post shows you how to do the binary stream using or using a control.

http://setiabud.blogspot.com/2010/02/using-aspnet-chart-controls-in-aspnet.html

忆悲凉 2024-08-30 03:40:25

Dundas 链接相当过时,要求在内容页面以及处理程序页面中复制图表控件。需要阅读一些内容才能完全理解的一种非常巧妙(且简单)的方法是在内容页面中使用 img 标签,其中 imageUrl 指向处理程序页面,并在运行时添加查询字符串并传入任何所需的参数。

对于处理程序页面,您有 2 个选项 - ashx 或 aspx 页面,除图表控件外不包含任何标记。第二种方法可以轻松地在设计器中设置图表的某些元素的样式,并在运行时连接其余元素。

请参阅链接 asp.net:图表处理程序中的临时目录无效配置 [c:\TempImageFiles\] (特别是,向下滚动以回复 Stefan Steiger)以及 https://web.archive.org/web/20201205231110/https://www.4guysfromrolla.com/articles/081909-1 .aspx(有点过时了)。

The dundas link is quite dated, requiring the chart control to be duplicated in the content page, and also in the handler page. A really slick (and easy) way that takes a bit of reading to fully understand is to use an img tag in the content page with imageUrl pointing to the handler page, and adding query string at runtime passing in any required parameters.

You have 2 options for the handler page - either an ashx, or an aspx page containing no markup except for the chart control. This 2nd method makes it easy to style certain elements of the chart in the designer, and wire up the rest at runtime.

See link asp.net:Invalid temp directory in chart handler configuration [c:\TempImageFiles\] (and in particular, scroll down to reply by Stefan Steiger) and also https://web.archive.org/web/20201205231110/https://www.4guysfromrolla.com/articles/081909-1.aspx (a little bit out of date).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文