Use the winform control in the webpage and adjust its size (using winform control in ASP. NET and adjust its size)

Source: Internet
Author: User

Difficult customer, time-consuming, depressing ing

 

The method for using the winform control has not come yet:

Http://www.15seconds.com/issue/030610.htm

Http://codebetter.com/blogs/peter.van.ooijen/archive/2007/06/18/including-a-winforms-user-control-in-an-asp-net-web-page.aspx

Http://www.codeproject.com/KB/miscctrl/htmlwincontrol.aspx

 

Adjust the size using JS

 CodeIt is based on http://www.codeproject.com/kb/miscctrl/htmlwincontrol.aspx. you can download it.

 

<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en" >
< Html >
< Head >
< Title > </ Title >
< Meta Name = "Generator" Content = "Microsoft Visual Studio. net7.1" >
< Meta Name = "Progid" Content = "Visualstudio. html" >
< Meta Name = "Originator" Content = "Microsoft Visual Studio. net7.1" >
< Script ID = "Clienteventhandlersjs" Language = "JavaScript" >
<! --

FunctionButton1_onclick (){
Alert (datetimepicker. date );
}

Function Resize ()
{
VaR UC = Document. getelementbyid ( " Datetimepicker " );
UC. style. Height = " 310 " ;
UC. style. Width = " 1100 " ;
}

// -->
</ Script >
</ Head >
< Body Ms_positioning = "Gridlayout" Onload = "Resize ();" >
< Table Height = "95" Cellspacing = "0" Cellpadding = "0" Width = "188" Border = "0" Ms_2d_layout = "True" >
< Tr Valign = "TOP" >
< TD Width = "10" Height = "15" > </ TD >
< TD Width = "47" > </ TD >
< TD Width = "131" > </ TD >
</ Tr >
< Tr Valign = "TOP" >
< TD Height = "55" > </ TD >
< TD Colspan = "2" >
< Object ID = "Datetimepicker" Height = "31" Width = "177" Classid = "Bin/deacero. Web. Controls. datetime. dll # deacero. Web. Controls. datetime. datetimepicker"
Viewastext >
</ Object >
</ TD >
</ Tr >
< Tr Valign = "TOP" >
< TD Colspan = "2" Height = "25" > </ TD >
< TD > < Input ID = "Button1" Type = "Button" Value = "Button" Name = "Button1" Onclick = "Return button1_onclick ()" > </ TD >
< Input ID = "Button2" Type = "Button" Value = "Button2" Onclick = "Resize ();"   />
</ Tr >
</ Table >
</ Body >
</ Html >

 

Effect

 

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.