ÈçºÎÔÚASP.NETÒ³ÃæÖÐǶÈëWINFORM¿Ø¼þ¶þ
ÔÎÄ£ºÁõÎä|ÈçºÎÔÚASP.NETÒ³ÃæÖÐǶÈëWINFORM¿Ø¼þ¶þ
ÉÏһƪ½éÉÜÁËÔÚASP.NETÒ³ÃæÖÐǶÈëWINFORM¿Ø¼þµÄ»ù±¾·½·¨£¬±¾Æª»á¾Ù¸öÉÔ΢¸´ÔÓµÄÀý×ÓÀ´ËµÃ÷ÈçºÎÔÚÒ³ÃæÖе÷ÓÃWINFORM¿Ø¼þµÄÊôÐԺͷ½·¨¡£
Ò» н¨ÏîÄ¿ Liuw.Net.WindowsControlLibrary£¬²¢Ìí¼ÓWINDOWSÓû§¿Ø¼þ MyControl1
¶þ ¸ø¿Ø¼þ MyControl1 Ìí¼ÓÊôÐԺͷ½·¨£º
C#-Code:
namespace Liuw.Net.WindowsControlLibrary
{
public partial class MyControl1 : UserControl
{
public MyControl1()
{
InitializeComponent();
}
private string _userName = "";
public string UserName
{
set { _userName = value; }
get { return _userName; }
}
public void SayHello()
{
MessageBox.Show("Welcome To Liuwu.net," + _userName);
}
}
}
¸Ã¿Ø¼þ°üº¬Ò»¸öUserNameÊôÐÔ¼°SayHello·½·¨£¬µ±µ÷Ó÷½·¨µÄʱºò£¬Ôòµ¯³ö¶Ô»°¿ò¡£
Èý ±àÒëÏîÄ¿£¬²¢¿½±´dllÎļþµ½ÍøվĿ¼
ËÄ Ìí¼ÓÒ³ÃæSayHello.aspx
ASP.NET-Code:
<script type="text/javascript">
function SayHello()
{
var obj = document.getElementById("ctl");
var input = document.getElementById("inputName");
obj.UserName = input.value;
obj.SayHello();
}
</script>
Name:<input type="text" id="inputName" /><br />
<input type="button" v
Ïà¹ØÎĵµ£º
ÈÎÖ°×ʸñ:
1. ´óѧ±¾¿ÆÒÔÉÏѧÀú£¬ÈýÄêÒÔÉÏÈí¼þ¿ª·¢¹¤×÷¾Ñé»ò»¥ÁªÍø¿ª·¢¾Ñ飻¾ßÓжþ¸ö¼°ÒÔÉÏÖÐÐÍÏîÄ¿µÄ³É¹¦ÊµÊ©¾Ñ飻
2. ÓÐ׼ȷÀí½âÐèÇ󡢼ܹ¹ÄÜÁ¦£¬ÓнÏÇ¿µÄ³ÌÐòÉè¼ÆÄÜÁ¦, ÊìϤÃæÏò¶ÔÏó·ÖÎö¡¢Èí¼þ¹¤³Ì¡¢UMLµÈÏà¹Ø¼¼Êõ£»
3. ÊìÁ·ÕÆÎÕ¼ÆËã»ú±à³ÌÒ»°ã˼ÏëºÍ·½·¨£»ÊìϤһÖÁÁ½ÖÖÃæÏò¶ÔÏó±à³ÌÓïÑÔ£»¾«Í¨.NET¡¢ C#¡¢ASP.net¡ ......
//TransmitFileʵÏÖÏÂÔØ
protected void Button1_Click(object sender, EventArgs e)
{
/*
΢ÈíΪResponse¶ÔÏóÌṩÁËÒ»¸öеķ½·¨TransmitFileÀ´½â¾öʹÓÃResponse.BinaryWrite
&nbs ......
using System;
using System.Web;
using System.Text.RegularExpressions;
public static string NoHTML(string Htmlstring)
{
//ɾ³ý½Å±¾
Htmlstring = Regex.Replace(Htmlstring,@"<script[^>]*?>.*?&l ......
ÓÃASP.NETÓÐÒ»¶Îʱ¼äÁË£¬µ«×ܾõµÃ»¹ÊÇÒ»Ö±¸¡ÓÚ±íÃ棬¶Ô¿Ø¼þ¿ª·¢ÖªÖ®ÉõÉÙ£¬¹Ê½üÆÚ¿ªÊ¼¶ñ²¹Õâ·½ÃæµÄÄÚÈÝ¡£ÒªÅÜÌâÁË£¬»¹ÊÇÏȻعËÒ»ÏÂÓ¦¸ÃÈçºÎÉÏÊÖASP.NET£¬¸ø¸Õ¿ªÊ¼½Ó´¥ËüµÄͬ־һµãÖ¸Òý£º
1¡¢ÅªÇå³þʲôÊÇ.NET£ºËµ°×ÁËËü¾ÍÊÇÒ»Ì׿ؼþ°ü£¬Ò»°ã±»Ëµ³É¿ò¼Ü£¬ÀàËÆÓÚMFC»òÕßDELPHIµÄVCLµÈµ ......
¡¡¡¡jQuery Ajax µ÷ÓÃAspx.Net WebService µÄ¼¸¸ö³£ÓÿÉÒÔÖ±½Ó¸´ÖÆ´úÂëÔËÐС£
¡¡¡¡ws.aspx ´úÂë
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runa ......