ASP. NET-FineUI development practices-1

Source: Internet
Author: User

I have been using. Net for three years. I am mainly engaged in asset management, production processes, and quality tracing. Net is still very reliable in this regard. In February, I had low access to FineUI. At that time, the version was 3.0 +. At first glance, I remembered ExtJs, which was actually used. net encapsulates ExtJs to enable ASP. NET development is more efficient, and it is actually used.

ASP. NET is indeed a headache. Many things are awkward even when combined with front-end Js, while ExtJs is in. net development environment is very complex and completely another language, even if there is ExtJs For later. net is also not good, the result is useless. The FineUI processing and sending back mechanism combines the advantages of ExtJs and ASP. NET, which makes development quite simple. I think so.

Good software products should include the following points. It is the most basic function and powerful function to meet various complex needs. Simple: program development must be fast and simple, reduce the development cycle, and reduce software costs, A good framework is essential. Second, software operations are quick and intuitive to use. Beautiful and Good UIs make people enjoy it. People who do not know the software even have the desire to operate. I dare not raise the FineUI framework too much. I can only say that it can basically meet the needs of simplicity and beauty. I am using enough.

In April March, The FineUI framework upgrade product was officially launched. Many problems have also been encountered during development, greatly changing the original code logic and eliminating the need to handle unwanted sending back. Front-end JavaScript saves a large part, and all the code is open-source, after careful research, you can also learn a lot, and even change the control to adapt to your own. FineUI integrates many common ASP. NET controls, but after all, it is built on ExtJs, so there is no major relationship between front-end rendering and ASP. NET controls. SO, record the issues encountered and solved during the development process. Let more people leave the bitter sea. I don't want to teach this tutorial. I'm not a master. Don't look at me highly. I'm CodingFarmer, don't spray me. The actual development environment is FineUI 4.0.4.


1. GetClientIDS method in the instance code

There is no need. At first, I didn't see it clearly. In fact, it is to output the ClientID of a control, which will be automatically generated during HTML rendering, write ClientIDMode = "Static" on the front-end control to directly find F ('control id') on the front-end.

2. We recommend that you add <% @ Register Assembly = "FineUI" Namespace = "FineUI" TagPrefix = "f" %>

It is not laborious to stick to the line of code. My project has great functions and cannot avoid mixing FineUI and ASP. NET pages. Therefore, it is not written as a site or configuration and can be compatible with multiple components. Mixing ASP. NET controls on the FineUI page is not recommended unless there are special features.

3. Edit the page for sending back

After editing the page, the parent page list is automatically refreshed, __dopostback is liberated. Directly Add code

function ActiveWindowBack() {            var activeWindow = F.wnd.getActiveWindow();            activeWindow.window.__doPostBack('', 'SaveMs_' + F('_hidPageIndex').getValue() + '_' + F('_hidSelectIndex').getValue());        }

GetValue () is the value, and activeWindow. window is the meaning of the upper-level page. After the data is saved in the background, the system prompts and refreshes.
Alert. Show (resultMsg, "prompt", "ActiveWindowBack ();");
Alert. Show () Outputs a Div. Click the confirmation prompt and then execute the foreground ActiveWindowBack method.

Receiving on the parent page

if (GetRequestEventArgument().IndexOf("SaveMs") >= 0)                {                    string SaveMs = GetRequestEventArgument();                    BindQueryUserInfo();                    try                    {                        Grid1.PageIndex = Convert.ToInt32(SaveMs.Split('_')[1]);                        Grid1.SelectedRowIndex = Convert.ToInt32(SaveMs.Split('_')[2]);                    }                    catch { }                }
The acceptance method receives parameters and executes grid binding and selection pages and rows. To be executed in IsPostBack. In the FineUI framework, as long as you do not refresh it, it will always be in that State. In this method, the other information on the parent page will not change. Only the grid will be rebound, and the speed will be fine. As long as there are not many template columns, I cannot see it.

Next, we will introduce the page formatting techniques to flexibly use FingUI. Grid and common Js. There will be various Iframe page interactions in the future.

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.