ASP.NET´úÂëÆ¬¶Î
ÉèÖÃÏÂÀ¿òµÄ³õʼֵ£º
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Text="Сѧ" Value="1"></asp:ListItem>
<asp:ListItem Text="ÖÐѧ" Value="2"></asp:ListItem>
<asp:ListItem Text="´óѧ" Value="3"></asp:ListItem>
</asp:DropDownList>
string init = "2";
for (int i = 0; i < DropDownList1.Items.Count; i++)
{
if (DropDownList1.Items[i].Value.ToString() == init)
{
DropDownList1.Items[i].Selected = true;
}
}
DropDownList1.Items.Insert(0,new ListItem("Ñ¡ÔñÀà±ð",0));
<asp:GridView ID="GridView1" ShowFooter="false" BorderColor="Black" OnRowDataBound="GridView1_RowDataBound" runat="server" AutoGenerateColumns="False" Font-Size="12px" Width="549px" AllowPaging="True" >
<Columns>
<asp:BoundField DataField="ID" HeaderText="񅧏" />
<asp:BoundField DataField="EmpBirthday" HeaderText="ÉúÈÕ" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" />
&nbs
Ïà¹ØÎĵµ£º
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Web.UI;
/// <summary>
/// һЩ³£ÓõÄJsµ÷ÓÃ
/// Ìí¼ÓаæËµÃ÷£ºÓÉÓھɰæÆÕ±é²ÉÓÃResponse.Write(string msg)µÄ·½Ê½Êä³öjs½Å±¾£¬ÕâÖÖ
/// ·½Ê½Êä³öµÄjs½Å±¾»áÔÚhtmlÔªËØµÄ<html>&a ......
1¡¢ÓÉdatasetÉú³É
public void CreateExcel(DataSet ds,string typeid,string FileName)
{
HttpResponse resp;
resp = Page.Response;
resp.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
resp.AppendHeader("Conte ......
JavaScriptʵÏÖ£º
<mce:script type ="text/javascript" ><!--
function readWord()
{
var div1=document .getElementById ("div1");
var WordApp,WordDoc,Str;
WordApp =new ActiveXObject ("Word.application");
WordDoc =WordApp.Documents.Open("F:\\¹¤×÷ÈÕÖ¾.doc");
......
µ±Ò»¸öÍøÒ³ÖмÈÓÐÊý¾ÝÑéÖ¤¿Ø¼þ£¬ÓÖÓÐÒ»¸ö°´Å¥ÔÚµã»÷ʱ³öÏÖÌáʾ°´Å¥¡£
Èç¹ûÖ±½ÓÔÚÒ³ÃæµÄºǫ́´úÂëµÄPage_Loadº¯ÊýÖÐдÈëbtn.Attributes["Onclick"] = "return confirm('È·¶¨Òª±£´æÊý¾Ý£¿')"£¬ÄÇôÑéÖ¤¿Ø¼þ¾Í»áʧЧ£¬ÒòΪÑéÖ¤¿Ø¼þÒ²ÊÇͨ¹ýjsʵÏֵģ¬ÕâÑùµÄ»°return confirm('È·¶¨Òª±£´æÊý¾Ý£¿')ÏÈÓÚÔÀ´µÄjs´úÂëÖ´ÐУ¬Ì ......
using System;
using System.IO;
namespace WriteLog
{
/// <summary>
/// WriteInLog µÄժҪ˵Ã÷¡£
/// </summary>
public class WriteInLog
......