Design of ASP. Net Multimedia Electronic newspapers and periodicals (2)

Source: Internet
Author: User

After converting a PDF file into an image, we can now position each image in a rectangle, that is, to locate all the news in each image.

A rectangle has four coordinate points. In the future, we need to use VML to sketch it out, and then use JavaScript to control it. This rectangle is only available when it is moved to a rectangle. Therefore, in this step, you need to save the point outlined by VML, the minimum and maximum values of the X axis, and the minimum and maximum values of the Y axis.

The HTML code is as follows:

<HTML xmlns = "http://www.w3.org/1999/xhtml"> 

C # The Code is as follows:

Public partial class savepaper: system. Web. UI. Page {protected void page_load (Object sender, eventargs e) {ajaxpro. Utility. registertypeforajax (typeof (savepaper); If (! Ispostback) {datatable dt = sqlhelper. excutedatatable ("select * From tb_techpapers"); rpttechpapers. datasource = DT; rpttechpapers. databind () ;}} protected void lbtntechpapername_click (Object sender, eventargs e) {linkbutton lbtn = (linkbutton) sender; txttechpapername. value = lbtn. text; datatable dt = sqlhelper. excutedatatable ("select * From tb_techpaperdetails where techpaperid =" + lbtn. toolt IP); rpttechpaperdetails. datasource = DT; rpttechpaperdetails. databind ();} [ajaxpro. ajaxmethod (ajaxpro. httpsessionstaterequirement. readwrite)] Public String savetechpaperrects (string strtechpaperdid, string strtechpaperrects) {string strsql = ""; // 1. delete the rectangular data strsql = "delete tb_techpaperrects where techpaperdid =" + strtechpaperdid; sqlhelper. executesql (strsql); // 2. save every new rectangle string [] S Trarraytechpaperrects = strtechpaperrects. split ('|'); foreach (string strtechpaperrect in strarraytechpaperrects) {string [] strarraytechpaperrect = strtechpaperrect. split ('&'); techpaperrects mtechpaperrects = new techpaperrects (); mtechpaperrects. techpaperrid = mtechpaperrects. getmaxid (); mtechpaperrects. techpaperdid = convert. toint32 (strtechpaperdid); mtechpaperrects. techpaperrpoint = strarrayt Echpaperrect [0]; mtechpaperrects. techpaperrminx = strarraytechpaperrect [1]; mtechpaperrects. techpaperrmaxx = strarraytechpaperrect [2]; mtechpaperrects. techpaperrminy = strarraytechpaperrect [3]; mtechpaperrects. techpaperrmaxy = strarraytechpaperrect [4]; mtechpaperrects. techpaperrname = strarraytechpaperrect [5]; mtechpaperrects. add ();} return "successful! ";}}

If you have any questions or errors, you are welcome to correct and discuss them.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.