﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>语源科技BlogJava-星星之约</title><link>http://www.blogjava.net/qiuxing/</link><description>一位学生转向一位工作者</description><language>zh-cn</language><lastBuildDate>Mon, 06 Apr 2026 10:22:54 GMT</lastBuildDate><pubDate>Mon, 06 Apr 2026 10:22:54 GMT</pubDate><ttl>60</ttl><item><title>VB.NET读写INI配置文件</title><link>http://www.blogjava.net/qiuxing/archive/2006/12/26/90113.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Tue, 26 Dec 2006 07:19:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/12/26/90113.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/90113.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/12/26/90113.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/90113.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/90113.html</trackback:ping><description><![CDATA[
		<p>  Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />        Dim path As String<br />        path = Application.StartupPath + "\Send.ini"<br />        TextBox1.Text = GetINI("Send", "Send1", "", path)<br />        TextBox2.Text = GetINI("Send", "Send2", "", path)<br />        Dim IsSms As Integer = GetINI("Send", "IsSms", "", path)<br />        If (IsSms = 1) Then<br />            Me.RadioButton1.Checked = True<br />        ElseIf (IsSms = 0) Then<br />            Me.RadioButton2.Checked = True<br />        End If</p>
		<p>    End Sub<br />    Public Function GetINI(ByVal Section As String, ByVal AppName As String, ByVal lpDefault As String, ByVal FileName As String) As String<br />        Dim Str As String = LSet(Str, 256)<br />        GetPrivateProfileString(Section, AppName, lpDefault, Str, Len(Str), FileName)<br />        Return Microsoft.VisualBasic.Left(Str, InStr(Str, Chr(0)) - 1)<br />    End Function<br />    Public Function WriteINI(ByVal Section As String, ByVal AppName As String, ByVal lpDefault As String, ByVal FileName As String) As Long<br />        WriteINI = WritePrivateProfileString(Section, AppName, lpDefault, FileName)<br />    End Function<br />    Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Int32, ByVal lpFileName As String) As Int32<br />    Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFileName As String) As Int32</p>
		<p> </p>
		<p>    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />        Try<br />            Dim path As String<br />            path = Application.StartupPath + "\Send.ini"<br />            WriteINI("Send", "Send1", TextBox1.Text, path)<br />            WriteINI("Send", "Send2", TextBox2.Text, path)<br />            If (Me.RadioButton1.Checked = True) Then<br />                WriteINI("Send", "IsSms", 1, path)<br />            ElseIf (Me.RadioButton2.Checked = True) Then<br />                WriteINI("Send", "IsSms", 0, path)</p>
		<p>            End If<br />            MsgBox("配置设置已经成功！！！！")</p>
		<p>
				<br />        Catch ex As Exception<br />            MsgBox("错误！！！！")<br />        End Try</p>
		<p>    End Sub</p>
<img src ="http://www.blogjava.net/qiuxing/aggbug/90113.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-12-26 15:19 <a href="http://www.blogjava.net/qiuxing/archive/2006/12/26/90113.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>AJAX实现web页面中级联菜单的设计 </title><link>http://www.blogjava.net/qiuxing/archive/2006/12/15/87937.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Fri, 15 Dec 2006 06:09:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/12/15/87937.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/87937.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/12/15/87937.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/87937.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/87937.html</trackback:ping><description><![CDATA[
		<div class="con_sample">
				<p>看了大峡搞的级联菜单，我也班门弄斧一把，嘿嘿，花了一点时间搞了个级联菜单贴上来看看。本例中只要你选择成员分类名称就会自动显示成员名称： 首先在eclipse中建一个项目，名称你自己做主了，这里为Easyjf-menu，对应的浏览器页面代码为： Easyjf-menu.jsp </p>
		</div>
		<div class="con_all">
				<p>
				</p>
				<div>
						<div>看了大峡搞的级联菜单，我也班门弄斧一把，嘿嘿，花了一点时间搞了个级联菜单贴上来看看。本例中只要你选择成员分类名称就会自动显示成员名称： </div>
						<div>
								<span>   </span>首先在eclipse中建一个项目，名称你自己做主了，这里为Easyjf-menu，对应的浏览器页面代码为：</div>
						<div> Easyjf-menu.jsp</div>
						<div> &lt;@page contentType=”text/html;charser=UTF-8” language=”java”%&gt;</div>
						<div> &lt;head&gt;</div>
						<div>
								<span>   ……..</span>
						</div>
						<div> &lt;/head&gt;</div>
						<div> &lt;script language=”javascript”&gt;</div>
						<div>
								<span>   var XMLHttpReq;</span>
						</div>
						<div>
								<span>   var currentSort;</span>
						</div>
						<div>
								<span>   //</span>创建xmlhttprequset对象</div>
						<div>
								<span>   function createXMLHttpRequest(){</span>
						</div>
						<div style="TEXT-INDENT: 21pt">
								<span>   if(window.XMLHttpRequest){</span>
						</div>
						<div style="TEXT-INDENT: 36.75pt">
								<span>   XMLHttpReq=new XMLHttpRequest();</span>
						</div>
						<div style="TEXT-INDENT: 36.75pt"> }</div>
						<div style="TEXT-INDENT: 36.75pt">else if (window.ActiveXObject){</div>
						<div style="TEXT-INDENT: 36.75pt">  try{</div>
						<div style="TEXT-INDENT: 36.75pt"> <span>    XMlHttpReq=new ActiveXObject(“Msxml2.XMLHTTP”);</span></div>
						<div style="TEXT-INDENT: 36.75pt">
								<span>    }catch(e){}</span>
						</div>
						<div style="TEXT-INDENT: 36.75pt">
								<span>       try{</span>
						</div>
						<div style="TEXT-INDENT: 78.75pt"> XMLHttpRequest=new ActiveXObject(“Microsoft.XMLHTTP”);</div>
						<div style="TEXT-INDENT: 78.75pt">}catch(e){}</div>
						<div style="TEXT-INDENT: 36.75pt">}</div>
						<div style="TEXT-INDENT: 21pt">}</div>
						<div style="TEXT-INDENT: 21pt">//发送请求函数</div>
						<div style="TEXT-INDENT: 21pt">function sendRequest(url){</div>
						<div style="TEXT-INDENT: 26.25pt"> createXMLHttpRequest();</div>
						<div style="TEXT-INDENT: 26.25pt"> XMLHttpReq.open(“GET”,url,true);</div>
						<div style="TEXT-INDENT: 26.25pt"> XMLHttpReq.onreadystatechange=processResponse;</div>
						<div style="TEXT-INDENT: 26.25pt"> XMLHttpReq.send(null);</div>
						<div style="TEXT-INDENT: 26.25pt">}</div>
						<div style="TEXT-INDENT: 26.25pt">//处理返回信息函数</div>
						<div style="TEXT-INDENT: 26.25pt">function processResponse(){</div>
						<div style="TEXT-INDENT: 31.5pt">
								<span>   if(XMLHttpRequest.readyState==4){</span>
						</div>
						<div style="TEXT-INDENT: 47.25pt">
								<span>   if(XMLHttpRequest.status==200){</span>
						</div>
						<div style="TEXT-INDENT: 63pt"> updateMenu();</div>
						<div style="TEXT-INDENT: 63pt">}else{alert(“您请求的页面有异常!”)}</div>
						<div style="TEXT-INDENT: 47.25pt">}</div>
						<div style="TEXT-INDENT: 31.5pt">}</div>
						<div style="TEXT-INDENT: 31.5pt">//更新菜单函数</div>
						<div style="TEXT-INDENT: 31.5pt">function updateMenu(){</div>
						<div style="TEXT-INDENT: 31.5pt"> var res=XMLHttpReq.responseXML.getElementIdByTagName(“res”);</div>
						<div style="TEXT-INDENT: 31.5pt"> var sunMenu=””;</div>
						<div style="TEXT-INDENT: 31.5pt"> for(var i=0;i&lt;res.length;i++){</div>
						<div style="TEXT-INDENT: 42pt"> submenu=subMenu+res[1].fistChild.data+”&lt;br&gt;”;</div>
						<div style="TEXT-INDENT: 42pt">}</div>
						<div style="TEXT-INDENT: 42pt">currentSort.innerHTML=submenu;</div>
						<div style="TEXT-INDENT: 31.5pt">}</div>
						<div style="TEXT-INDENT: 31.5pt">//创建级联菜单</div>
						<div style="TEXT-INDENT: 31.5pt">function showSubMenu(obj){</div>
						<div style="TEXT-INDENT: 31.5pt">
								<span>   currentSort=document.getElementById(obj);</span>
						</div>
						<div style="TEXT-INDENT: 31.5pt">
								<span>   currentSort.parentNode.style.display=””;</span>
						</div>
						<div style="TEXT-INDENT: 31.5pt">
								<span>   sendRequest(“menu?sort=”+obj);</span>
						</div>
						<div style="TEXT-INDENT: 31.5pt">}</div>
						<div style="TEXT-INDENT: 31.5pt">&lt;/script&gt;</div>
						<div style="TEXT-INDENT: 31.5pt">&lt;b&gt;EasyJF成员&lt;/b&gt;</div>
						<div style="TEXT-INDENT: 31.5pt">&lt;a onClick=”onShowSubMenu(‘大峡’)”&gt;大峡&lt;/a&gt;</div>
						<span style="FONT-SIZE: 10.5pt">,</span>
						<span style="FONT-SIZE: 10.5pt">该页面中提供了对应的菜单以供用户选择，用户选择菜单后，调用</span>
						<span style="FONT-SIZE: 10.5pt">showSubMenu(‘XXX’)</span>
						<span style="FONT-SIZE: 10.5pt">函数，其中参数用于传递用户所选菜单的标识信息到服务器以决定获取服务器的哪个在菜单内容，首先获得菜单的识别信息，再提交给</span>
						<span style="FONT-SIZE: 10.5pt">Ajax,</span>
						<span style="FONT-SIZE: 10.5pt">这里用</span>
						<span style="FONT-SIZE: 10.5pt">innerHTML</span>
						<span style="FONT-SIZE: 10.5pt">属性实现定位显示！</span>
				</div>
				<p>
				</p>
		</div>
<img src ="http://www.blogjava.net/qiuxing/aggbug/87937.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-12-15 14:09 <a href="http://www.blogjava.net/qiuxing/archive/2006/12/15/87937.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>一次编辑 GridView 的所有行</title><link>http://www.blogjava.net/qiuxing/archive/2006/12/15/87936.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Fri, 15 Dec 2006 06:06:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/12/15/87936.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/87936.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/12/15/87936.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/87936.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/87936.html</trackback:ping><description><![CDATA[
		<p>在平时的实际项目中，为了减少往返提交数据，可以一次编辑 GridView 的所有行，这样大大提高用户使用产品的体验。下面就讲解何一次编辑 GridView 的所有数据行。在下面的例子中，数据库使用《ASP.NET 2.0应用开发技术》一书中Site\App_Data\下的 ASPNET20Book.mdb 数据库。例子中的数据更新方式使用 SqlDataSource 数据源控件的UpdateCommand属性，但此方法同样适用于存储过程，SQL 语句等。</p>
		<p align="center">
				<img alt="" src="http://p.blog.csdn.net/images/p_blog_csdn_net/net_lover/MultiEdit.png" />
		</p>
		<p>
				<strong>C#</strong> </p>
		<div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
				<div>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@ Page Language</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">C#</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> Debug</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">true</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;!</span>
						<span style="COLOR: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">script </span>
						<span style="COLOR: #ff0000">runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">
								<br />string[] ClassNameArray </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> { </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">大学</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">中学</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">高中</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> };<br /><br /></span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">初始化原来的值</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">
								<br />
						</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">protected </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">void</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> GridView1_RowDataBound(object sender, GridViewRowEventArgs e)<br />{    <br />  </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (e.Row.RowType </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> DataControlRowType.DataRow)<br />  {<br />    System.Data.DataRowView drv </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (System.Data.DataRowView)e.Row.DataItem;<br />    RadioButtonList rbl </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (RadioButtonList)e.Row.FindControl(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">txtGender</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<br />    </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (rbl </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">!=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">null</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)<br />    {<br />      </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ((bool)drv[</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Gender</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">])<br />      {<br />        rbl.Items.FindByText(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">男</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">).Selected </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">true</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<br />      }<br />      </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">else</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">
								<br />      {<br />        rbl.Items.FindByText(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">女</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">).Selected </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">true</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<br />      }<br />    }<br /><br />    DropDownList ddl </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (DropDownList)e.Row.FindControl(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">txtClassName</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<br />    </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (ddl </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">!=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">null</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)<br />    {<br />      ddl.Items.FindByText(drv[</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">ClassName</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">].ToString()).Selected </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">true</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<br />    }<br />  }<br />}<br /><br /></span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> 初始化项目列表</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">
								<br />
						</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">protected </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">void</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> GridView1_RowCreated(object sender, GridViewRowEventArgs e)<br />{    <br />  </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (e.Row.RowType </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> DataControlRowType.DataRow)<br />  {<br />    DropDownList ddl </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (DropDownList)e.Row.FindControl(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">txtClassName</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<br />    ddl.DataSource </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ClassNameArray;<br />    ddl.DataBind();<br />  }<br />}<br /><br /></span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">处理提交的数据</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">
								<br />
						</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">protected </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">void</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> <font color="#0000ff">XianhuiMeng</font>_Click(object sender, EventArgs e)<br />{<br />  foreach (GridViewRow gvr </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">in</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> GridView1.Rows)<br />  {<br />    string tGender </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ((RadioButtonList)gvr.FindControl(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">txtGender</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)).SelectedValue;<br />    SqlDataSource1.UpdateParameters.Add(</span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> Parameter(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@Title</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, TypeCode.String, ((TextBox)gvr.FindControl(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">txtTitle</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)).Text));<br />    SqlDataSource1.UpdateParameters.Add(</span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> Parameter(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@Gender</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, TypeCode.Boolean, (tGender </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">男</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">?</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">True</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> : </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">False</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)));<br />    SqlDataSource1.UpdateParameters.Add(</span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> Parameter(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@ClassName</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, <br />                   TypeCode.String, ((DropDownList)gvr.FindControl(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">txtClassName</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">)).SelectedValue));<br />    SqlDataSource1.UpdateParameters.Add(</span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> Parameter(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@id</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, TypeCode.Int32, GridView1.DataKeys[gvr.DataItemIndex].Value.ToString()));<br />    SqlDataSource1.Update();<br />    SqlDataSource1.UpdateParameters.Clear();<br />  }<br />  Response.Redirect(Request.UrlReferrer.ToString());<br />}<br /></span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">script</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">html </span>
						<span style="COLOR: #ff0000">xmlns</span>
						<span style="COLOR: #0000ff">="http://www.w3.org/1999/xhtml"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">head </span>
						<span style="COLOR: #ff0000">id</span>
						<span style="COLOR: #0000ff">="Head1"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">title</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">同时编辑 GridView的 多行</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">title</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">head</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">body</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">form </span>
						<span style="COLOR: #ff0000">id</span>
						<span style="COLOR: #0000ff">="form1"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:GridView </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="GridView1"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #ff0000"> Font-Size</span>
						<span style="COLOR: #0000ff">="12px"</span>
						<span style="COLOR: #ff0000"> CellPadding</span>
						<span style="COLOR: #0000ff">="3"</span>
						<span style="COLOR: #ff0000"> AutoGenerateColumns</span>
						<span style="COLOR: #0000ff">="False"</span>
						<span style="COLOR: #ff0000">
								<br />    DataKeyNames</span>
						<span style="COLOR: #0000ff">="id"</span>
						<span style="COLOR: #ff0000"> DataSourceID</span>
						<span style="COLOR: #0000ff">="SqlDataSource1"</span>
						<span style="COLOR: #ff0000"> OnRowDataBound</span>
						<span style="COLOR: #0000ff">="GridView1_RowDataBound"</span>
						<span style="COLOR: #ff0000">
								<br />    OnRowCreated</span>
						<span style="COLOR: #0000ff">="GridView1_RowCreated"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />    </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">HeaderStyle </span>
						<span style="COLOR: #ff0000">BackColor</span>
						<span style="COLOR: #0000ff">="#EDEDED"</span>
						<span style="COLOR: #ff0000"> </span>
						<span style="COLOR: #0000ff">/&gt;</span>
						<span style="COLOR: #000000">
								<br />    </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">Columns</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:TemplateField </span>
						<span style="COLOR: #ff0000">HeaderText</span>
						<span style="COLOR: #0000ff">="姓名"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />          </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:TextBox </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="txtTitle"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #ff0000"> Text</span>
						<span style="COLOR: #0000ff">='&lt;%#Eval("Title") </span>
						<span style="COLOR: #ff0000">%</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">'&gt;</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:TextBox</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:TemplateField</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:TemplateField </span>
						<span style="COLOR: #ff0000">HeaderText</span>
						<span style="COLOR: #0000ff">="性别"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />          </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:RadioButtonList </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="txtGender"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #ff0000"> RepeatColumns</span>
						<span style="COLOR: #0000ff">="2"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />            </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:ListItem </span>
						<span style="COLOR: #ff0000">Text</span>
						<span style="COLOR: #0000ff">='男'</span>
						<span style="COLOR: #0000ff">&gt;&lt;/</span>
						<span style="COLOR: #800000">asp:ListItem</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />            </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:ListItem </span>
						<span style="COLOR: #ff0000">Text</span>
						<span style="COLOR: #0000ff">='女'</span>
						<span style="COLOR: #0000ff">&gt;&lt;/</span>
						<span style="COLOR: #800000">asp:ListItem</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />          </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:RadioButtonList</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:TemplateField</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:TemplateField </span>
						<span style="COLOR: #ff0000">HeaderText</span>
						<span style="COLOR: #0000ff">="学历"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />          </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:DropDownList </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="txtClassName"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />          </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:DropDownList</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:TemplateField</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />    </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">Columns</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:GridView</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:SqlDataSource </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="SqlDataSource1"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #ff0000"> <br />    ConnectionString</span>
						<span style="COLOR: #0000ff">="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|ASPNET20Book.mdb;Persist Security Info=True"</span>
						<span style="COLOR: #ff0000">
								<br />    ProviderName</span>
						<span style="COLOR: #0000ff">="System.Data.OleDb"</span>
						<span style="COLOR: #ff0000"> SelectCommand</span>
						<span style="COLOR: #0000ff">="SELECT * FROM [Student]"</span>
						<span style="COLOR: #ff0000"> <br />    UpdateCommand</span>
						<span style="COLOR: #0000ff">="Update [Student] Set Title = @Title,Gender = @Gender,ClassName=@ClassName Where id=@id"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:SqlDataSource</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:Button </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="Button1"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #ff0000"> Text</span>
						<span style="COLOR: #0000ff">="保存所有修改"</span>
						<span style="COLOR: #ff0000"> OnClick</span>
						<span style="COLOR: #0000ff">="XianhuiMeng_Click"</span>
						<span style="COLOR: #ff0000"> </span>
						<span style="COLOR: #0000ff">/&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">form</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">body</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">html</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
				</div>
		</div>
		<strong>
				<p>
						<strong style="COLOR: red">注意：对于SQL Server 数据库，参数名字不加@。另外注意：不同数据库类型和不同的数据源，UpdateCommand="Update [Student] Set Title = @Title,Gender = @Gender,ClassName=@ClassName Where id=@id"写法和SqlDataSource1.UpdateParameters.Add(new Parameter("@Title", TypeCode.String, ((TextBox)gvr.FindControl("txtTitle")).Text)); 的写法会有所区别。</strong>
				</p>
		</strong>
<img src ="http://www.blogjava.net/qiuxing/aggbug/87936.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-12-15 14:06 <a href="http://www.blogjava.net/qiuxing/archive/2006/12/15/87936.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ASP.NET 2.0中将 GridView 导出到 Excel 文件中</title><link>http://www.blogjava.net/qiuxing/archive/2006/12/15/87935.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Fri, 15 Dec 2006 06:05:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/12/15/87935.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/87935.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/12/15/87935.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/87935.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/87935.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 下面代码实现将 GridView 导出到 Excel文件中。		值得注意的是VerifyRenderingInServerForm重载方法：　　MSDN上的 VerifyRenderingInServerForm 方法的描述：　　必须位于 &lt;form runat=server&gt; 标记中的控件可以在呈现之前调用此方法，以便在控件被置于标记外时显示错误信息。发送回或依赖于注册的脚本块的...&nbsp;&nbsp;<a href='http://www.blogjava.net/qiuxing/archive/2006/12/15/87935.html'>阅读全文</a><img src ="http://www.blogjava.net/qiuxing/aggbug/87935.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-12-15 14:05 <a href="http://www.blogjava.net/qiuxing/archive/2006/12/15/87935.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>struts、spring、hibernate等框架的整合培训日记 </title><link>http://www.blogjava.net/qiuxing/archive/2006/12/15/87934.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Fri, 15 Dec 2006 06:04:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/12/15/87934.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/87934.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/12/15/87934.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/87934.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/87934.html</trackback:ping><description><![CDATA[
		<p>facade模式：就是中关村攒机者的角色，他负责与多个零件供销商交互并将这些零件组装起来交给最终客户。<br />struts与spring集成的两种方式：<br />第一种是在struts的Action的execute方法中调用spring的applicationContext去获得Manager对象，这里的Action自身没有用到spring的思想，Action无法作为Spring中的JavaBean进行配置，相应代码如下：<br />      ServletContext application = this.getServlet().getServletContext();<br />      WebApplicationContext wapp = (WebApplicationContext)WebApplicationContextUtils.getWebApplicationContext(application);<br />     //WebApplicationContext wapp = (WebApplicationContext)application.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);<br />     StudentManager studentManager = (StudentManager)wapp.getBean("studentManager");<br />  另外，spring为集成struts而提供了一个ContextLoaderPlugIn插件，其作用在于：创建一个ApplicationContext对象，并将这个对象存储在ServletContext中，以后在ActionSupport中就可以调用getWebApplicationContext来获得这个ApplicationContext对象了，这并没有让我感觉有多大的好处，示例代码如下：<br />    Enumeration e = application.getAttributeNames();<br />    while(e.hasMoreElements())<br />    {<br />        String attributeName = (String)e.nextElement();<br />        String objClassName = application.getAttribute(attributeName).getClass().getName();<br />        try<br />        {<br />           response.getWriter().println(attributeName + ":" + objClassName + "&lt;br&gt;");<br />        }catch(Exception ex){}<br />    }<br />    StudentManager studentManager = this.getWebApplicationContext().getBean("studentManager"));</p>
		<p>第二种是将struts的Action作为spring的一个JavaBean进行配置，在Action里面只需要定义一个Manager变量和相应的setter/getter方法，就可以通过spring为其注入一个Manager对象。这种方式太复杂，很牵强，个人觉得没有什么实际意义，建议大家不必花费时间去学习。</p>
		<p>spring与hibernate整合的原理：<br />class MyController extend simpleformcontroller<br />{<br /> public MyController()<br /> {<br />  setCommandClass(Studnet.class);<br /> }<br />}<br />首先回忆使用hibernate的步骤：<br />1.创建和配置Configuration对象，配置Congiuration对象可以通过hibernate.properties或hiberate.cfg.xml文件，也可以完全采用如下的编程方式：<br />      configuration = new Configuration()<br />      configuration.addClass(Student.class)<br />             //.addFile("Student.hbm.xml")<br />             //.addResource("/Student.hbm.xml")<br />             .setProperty("show_sql","true");<br />2.由configuration创建出SessionFactory对象：             <br />    SessionFactory sf = configuration.buildSessionFactory();<br />3.通过SessionFactory获得session对象，然后进行CRUD操作：<br />    Session session = sf.openSession();<br />    session.save()\delete\update\load\<br />    session.close();<br />使用spring集成hibernate的第一步就是借助spring的配置创建出SessionFactory对象<br />&lt;bean id="sessionFactory" class="org.springframework.orm.hibernate.LocalSessionFactoryBean"&gt;<br /> &lt;property name="mappingResource?&gt;<br />  &lt;list&gt;<br />   &lt;value&gt;xx.hbm.xml&lt;/value&gt;<br />   &lt;value&gt;yyy.hbm.xml&lt;/value&gt;<br />  &lt;list&gt;<br /> &lt;/Property&gt;<br /> &lt;property name="hibernateProperties"&gt;<br />  &lt;props&gt;<br />   &lt;prop key="show_sql"&gt;true&lt;/prop&gt;<br />  &lt;props&gt;<br /> &lt;/property&gt;<br /> &lt;property name="datasource"&gt;&lt;ref locale=""/&gt;&lt;/property&gt;<br />&lt;/bean&gt;<br />在LocalSessionFactoryBean内部完全采用编程方式来配置configuration对象，而不再通过hibernate.properties或hiberate.cfg.xml配置文件，带着大家查看了LocalSessionFactoryBean的源代码。<br />有了SessionFactory，我们接着就可以通过spring将这个SessionFactory注入到DAO类中，配置如下:<br />&lt;bean id="studentDAO" class="cn.itcast.StudentDAO"&gt;<br /> &lt;property name="sessionFactory"&gt;<br />  &lt;ref bean="sessionFactory" /&gt;<br /> &lt;/property&gt;<br />&lt;/bean&gt;<br />相应的调用程序代码示意如下：<br />class StudentDAO<br />{<br /> sessionFactroy;<br /> void setSessionFactory(sessionFactory)<br /> {<br />  this.sessionFactory = sessionFactory;<br /> }<br /> insert(User user)<br /> {<br />  sessionFactory.openSession();//累<br />  session.save(user);<br />  session.close();//累<br /> }<br />}<br />我们还有自己openSession和getSession，这是不是很累呢？为此，spring又提供了一个配置类hibernateTemplate，它可以帮助我们去openSession和closeSession，这个配置类能够openSession,显然它一定要有SessionFactory的引用。<br />&lt;bean id="hibernateTemplate" class="HibernateTemplate"&gt;<br /> &lt;property name="sessionFactory"&gt;<br />  &lt;ref bean="sessionFactory" /&gt;<br /> &lt;/property&gt;<br />&lt;/bean&gt;<br />遵循spring的IOC思想，我们接着还要将HibernateTemplate注入到DAO类中，配置如下:<br />&lt;bean id="studentDAO" class="cn.itcast.StudentDAO"&gt;<br /> &lt;property name="hibernateTemplate"&gt;<br />  &lt;ref bean="hibernateTemplate" /&gt;<br /> &lt;/property&gt;<br />&lt;/bean&gt;</p>
		<p>class StudentDAO<br />{<br /> hibernateTemplate;<br /> void sethibernateTemplate(hibernateTemplate)<br /> {<br />  this.hibernateTemplate = hibernateTemplate;<br /> }<br /> insert(User user)<br /> {<br />  hibernateTemplate.save(user);//我们不再openSession和closeSession,不是很爽吗？<br /> }<br />}</p>
		<p>另外，spring还提供了一个HibernateSuport类，它可以通过注入的SessionFactory返回一个HibernateTemplate，我们的DAO类继承这个HibernateSupport，也可以获得HibernateTemplate对象进行CRUD操作，配置及示意代码如下：<br />&lt;bean id="studentDAO" class="cn.itcast.StudentDAO"&gt;<br /> &lt;property name="sessionFactory"&gt;<br />  &lt;ref bean="sessionFactory" /&gt;<br /> &lt;/property&gt;<br />&lt;/bean&gt;<br />class StudentDAO extends HibernateSuport<br />{<br /> /*hibernateTemplate;<br /> void gethibernateTemplate()<br /> {<br />  return hibernateTemplate;<br /> }<br /> sessionFactroy;<br /> void setSessionFactory(sessionFactory)<br /> {<br />  this.sessionFactory = sessionFactory;<br />  hibernateTemplate = new HibernateTemplate(sessionFactory);<br /> }*/<br /> <br /> <br /> insert(User user)<br /> {</p>
		<p>  getHibernateTemplate().save(user);<br /> }<br />}</p>
		<p> </p>
		<p>最后由王泽佑提问引出spring mvc的注册绑定的详细讲解：<br />在spring帮助文档中搜索editor，可以看到有关注册绑定的信息，CustomDateEditor是没有被自动注册的，需要用户在initBinder方法内部调用，示例代码如下：<br />protected void initBinder(<br />        HttpServletRequest request,<br />        ServletRequestDataBinder binder)<br />        throws ServletException {<br />        binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy/MM/dd"),true));<br />    }<br />一种替换的方式及registerCustomEditor底层的实现内幕：<br />调用BaseCommandController.setPropertyEditorRegistrars()方法，显然这可以作为controller的属性进行配置。<br />class MyPropertyEditorRegistrar<br />{<br /> void registerCustomEditors(PropertyEditorRegistry registry)<br /> {<br />  reguistry.registerCustomEditor(byte[].class, new ByteArrayMultipartFileEditor());<br /> }<br />}</p>
		<p>关于Date数据校验的问题：通过在struts帮助文挡的Validator帮助页面中搜索validate，是可以搜索到DateValidator的配置帮助的。</p>
		<p>如果注册了DateEditor，数据成功转换成Date类型的字段，那么随后的的Validator框架就没必要对这个Date字段进行校验了，因为Validator是对已装配到Bean中的字符串类型的字段进行校验，而数据都已经成功装配进了Date字段中，哪还有校验的必要。框架把数据装配到formbean里面，Validator从Formbean里面拿数据进行校验。</p>
		<p>
				<br />&lt;bean id="myController class="cn.itcast.MyController"&gt;<br /> &lt;property key="commandClass"&gt;<br />  &lt;value&gt;cn.itcast.Student&lt;/value&gt;<br /> &lt;/prperty&gt;<br />&lt;/bean&gt;<br />上面的配置信息相当于下面的一段代码，这其中就涉及到了属性绑定的问题，要把字符串"cn.itcast.Student"转换成Class对象。<br />Class clazz = Class.forName("cn.itcast.Student");<br />setCommandClass(clazz);<br /><br />小记：通过spring配置文件中的&lt;import&gt;元素的resource属性可以导入更多的配置文件，实现信息分散配置的目的。 </p>
<img src ="http://www.blogjava.net/qiuxing/aggbug/87934.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-12-15 14:04 <a href="http://www.blogjava.net/qiuxing/archive/2006/12/15/87934.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>利用GridView显示主细表并添加打开、关闭功能的扩展。</title><link>http://www.blogjava.net/qiuxing/archive/2006/12/15/87933.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Fri, 15 Dec 2006 06:02:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/12/15/87933.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/87933.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/12/15/87933.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/87933.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/87933.html</trackback:ping><description><![CDATA[
		<p>有网友在论坛上询问：如何在使用GridView显示主细表时添加删除功能？其实，如果单个GridView能够实现删除对话，N个GridView嵌套也没有任何问题。下面就将例子粘贴如下，望各位需要的朋友仔细揣摩一下，道理很简单的：）</p>
		<p>
				<strong>
						<a href="http://dotnet.aspx.cc/Exam/GridViewNested2.aspx">
								<font color="#000099">查看例子</font>
						</a>
				</strong>
		</p>
		<p>
				<strong>aspx</strong> ：</p>
		<div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
				<div>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">@ Page Language</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">C#</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> AutoEventWireup</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">true</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> CodeFile</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Default2.aspx.cs</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> Inherits</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Default2</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</span>
						<span style="COLOR: #000000">
								<br />
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;!</span>
						<span style="COLOR: #ff00ff">DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">html </span>
						<span style="COLOR: #ff0000">xmlns</span>
						<span style="COLOR: #0000ff">="http://www.w3.org/1999/xhtml"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">head </span>
						<span style="COLOR: #ff0000">id</span>
						<span style="COLOR: #0000ff">="Head1"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">title</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">利用GridView显示主细表并添加打开、关闭功能</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">title</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">style </span>
						<span style="COLOR: #ff0000">type</span>
						<span style="COLOR: #0000ff">="text/css"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5">
								<br />  td,div,a </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">{</span>
						<span style="COLOR: #ff0000; BACKGROUND-COLOR: #f5f5f5">font-size</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">12px</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">}</span>
						<span style="COLOR: #800000; BACKGROUND-COLOR: #f5f5f5">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">style</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">script </span>
						<span style="COLOR: #ff0000">type</span>
						<span style="COLOR: #0000ff">="text/javascript"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">
								<br />  </span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">&lt;![CDATA[</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">
								<br />
						</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">  </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">function</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ShowHidden(sid,ev)<br />  {<br />    ev </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ev </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">||</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> window.event;<br />    </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> target </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ev.target </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">||</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ev.srcElement;<br />    </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> oDiv </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> document.getElementById(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">div</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">+</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> sid);<br />    oDiv.style.display </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> oDiv.style.display </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">none</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">?</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">block</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">none</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<br />    target.innerHTML </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> oDiv.style.display </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">none</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">?</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">显示</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">:</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">隐藏</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">;<br />  }<br />  </span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">]]&gt;</span>
						<span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">
								<br />
						</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">  </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">script</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">head</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">body</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">form </span>
						<span style="COLOR: #ff0000">id</span>
						<span style="COLOR: #0000ff">="form1"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />    </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:GridView </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="MasterGridView"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #ff0000"> AutoGenerateColumns</span>
						<span style="COLOR: #0000ff">="false"</span>
						<span style="COLOR: #ff0000"> Width</span>
						<span style="COLOR: #0000ff">="780px"</span>
						<span style="COLOR: #ff0000">
								<br />      BorderWidth</span>
						<span style="COLOR: #0000ff">="1"</span>
						<span style="COLOR: #ff0000"> OnRowDataBound</span>
						<span style="COLOR: #0000ff">="MasterGridView_RowDataBound"</span>
						<span style="COLOR: #ff0000"> DataKeyNames</span>
						<span style="COLOR: #0000ff">="id"</span>
						<span style="COLOR: #ff0000">
								<br />      ShowHeader</span>
						<span style="COLOR: #0000ff">="false"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">Columns</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:TemplateField</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />          </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />            </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">div </span>
						<span style="COLOR: #ff0000">style</span>
						<span style="COLOR: #0000ff">="width: 100%; padding: 2px; font-weight: bold; background-color: #DEDEDE;<br />              float: left"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />              </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">span </span>
						<span style="COLOR: #ff0000">style</span>
						<span style="COLOR: #0000ff">="float: left"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">栏目名称：</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">#</span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">Eval</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Title</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">) </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">span</span>
						<span style="COLOR: #0000ff">&gt;&lt;</span>
						<span style="COLOR: #800000">span </span>
						<span style="COLOR: #ff0000">style</span>
						<span style="COLOR: #0000ff">="float: right;<br />                color: Red; cursor: pointer"</span>
						<span style="COLOR: #ff0000"> onclick</span>
						<span style="COLOR: #0000ff">="ShowHidden('&lt;%#Eval("</span>
						<span style="COLOR: #ff0000">id") %</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">',event)"&gt;隐藏</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">span</span>
						<span style="COLOR: #0000ff">&gt;&lt;/</span>
						<span style="COLOR: #800000">div</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />            </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">div </span>
						<span style="COLOR: #ff0000">style</span>
						<span style="COLOR: #0000ff">="background-color: #FFF; padding-left: 60px; clear: both"</span>
						<span style="COLOR: #ff0000"> id</span>
						<span style="COLOR: #0000ff">="div&lt;%#Eval("</span>
						<span style="COLOR: #ff0000">id") %</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">"&gt;<br />              </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:GridView </span>
						<span style="COLOR: #ff0000">ID</span>
						<span style="COLOR: #0000ff">="DetailGridView"</span>
						<span style="COLOR: #ff0000"> runat</span>
						<span style="COLOR: #0000ff">="server"</span>
						<span style="COLOR: #ff0000"> AutoGenerateColumns</span>
						<span style="COLOR: #0000ff">="false"</span>
						<span style="COLOR: #ff0000"> ShowHeader</span>
						<span style="COLOR: #0000ff">="true"</span>
						<span style="COLOR: #ff0000">
								<br />                HorizontalAlign</span>
						<span style="COLOR: #0000ff">="left"</span>
						<span style="COLOR: #ff0000"> DataKeyNames</span>
						<span style="COLOR: #0000ff">="id"</span>
						<span style="COLOR: #ff0000"> AutoGenerateDeleteButton</span>
						<span style="COLOR: #0000ff">="true"</span>
						<span style="COLOR: #ff0000"> OnRowCommand</span>
						<span style="COLOR: #0000ff">="DetailGridView_RowCommand"</span>
						<span style="COLOR: #ff0000">
								<br />                OnRowDeleting</span>
						<span style="COLOR: #0000ff">="DetailGridView_RowDeleting"</span>
						<span style="COLOR: #ff0000"> Width</span>
						<span style="COLOR: #0000ff">="720px"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />                </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">HeaderStyle </span>
						<span style="COLOR: #ff0000">BackColor</span>
						<span style="COLOR: #0000ff">="#9999FF"</span>
						<span style="COLOR: #ff0000"> </span>
						<span style="COLOR: #0000ff">/&gt;</span>
						<span style="COLOR: #000000">
								<br />                </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">Columns</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />                  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:TemplateField </span>
						<span style="COLOR: #ff0000">HeaderText</span>
						<span style="COLOR: #0000ff">="文章名称"</span>
						<span style="COLOR: #ff0000"> HeaderStyle-Width</span>
						<span style="COLOR: #0000ff">="540px"</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />                    </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />                      </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">a </span>
						<span style="COLOR: #ff0000">href</span>
						<span style="COLOR: #0000ff">="/article/&lt;%#Eval("</span>
						<span style="COLOR: #ff0000">objectGuid") %</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">/read.aspx"&gt;<br />                        </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">#</span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">Eval</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Title</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">) </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</span>
						<span style="COLOR: #000000">
								<br />                      </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">a</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">[</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">&lt;%</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"># </span>
						<span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">Eval</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">(</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">HitCount</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">) </span>
						<span style="COLOR: #000000; BACKGROUND-COLOR: #ffff00">%&gt;</span>
						<span style="COLOR: #000000">]<br />                    </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />                  </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:TemplateField</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />                  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:BoundField </span>
						<span style="COLOR: #ff0000">HeaderText</span>
						<span style="COLOR: #0000ff">="发布日期"</span>
						<span style="COLOR: #ff0000"> DataField</span>
						<span style="COLOR: #0000ff">="CreateDate"</span>
						<span style="COLOR: #ff0000"> HtmlEncode</span>
						<span style="COLOR: #0000ff">="false"</span>
						<span style="COLOR: #ff0000"> DataFormatString</span>
						<span style="COLOR: #0000ff">="{0:yyyy年MM月dd日}"</span>
						<span style="COLOR: #ff0000">
								<br />                    HeaderStyle-Width</span>
						<span style="COLOR: #0000ff">="100px"</span>
						<span style="COLOR: #ff0000"> ItemStyle-HorizontalAlign</span>
						<span style="COLOR: #0000ff">="Center"</span>
						<span style="COLOR: #ff0000"> </span>
						<span style="COLOR: #0000ff">/&gt;</span>
						<span style="COLOR: #000000">
								<br />                  </span>
						<span style="COLOR: #0000ff">&lt;</span>
						<span style="COLOR: #800000">asp:CommandField </span>
						<span style="COLOR: #ff0000">DeleteText</span>
						<span style="COLOR: #0000ff">="删除"</span>
						<span style="COLOR: #ff0000"> ShowDeleteButton</span>
						<span style="COLOR: #0000ff">="true"</span>
						<span style="COLOR: #ff0000"> ButtonType</span>
						<span style="COLOR: #0000ff">="Button"</span>
						<span style="COLOR: #ff0000"> HeaderStyle-Width</span>
						<span style="COLOR: #0000ff">="40px"</span>
						<span style="COLOR: #ff0000"> </span>
						<span style="COLOR: #0000ff">/&gt;</span>
						<span style="COLOR: #000000">
								<br />                </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">Columns</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />              </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:GridView</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />            </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">div</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />          </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">ItemTemplate</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />        </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:TemplateField</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />      </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">Columns</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />    </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">asp:GridView</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />  </span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">form</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">body</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
						<span style="COLOR: #0000ff">&lt;/</span>
						<span style="COLOR: #800000">html</span>
						<span style="COLOR: #0000ff">&gt;</span>
						<span style="COLOR: #000000">
								<br />
						</span>
				</div>
		</div>
		<p> </p>
		<p>C#：</p>
		<div style="BORDER-RIGHT: windowtext 0.5pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 0.5pt solid; PADDING-LEFT: 5.4pt; BACKGROUND: #e6e6e6; PADDING-BOTTOM: 4px; BORDER-LEFT: windowtext 0.5pt solid; WIDTH: 95%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: windowtext 0.5pt solid">
				<div>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Data;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Configuration;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Collections;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Web;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Web.Security;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Web.UI;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Web.UI.WebControls;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Data.OleDb;<br /></span>
						<span style="COLOR: #0000ff">using</span>
						<span style="COLOR: #000000"> System.Web.UI.HtmlControls;<br /><br /></span>
						<span style="COLOR: #0000ff">public</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">partial</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">class</span>
						<span style="COLOR: #000000"> Default2 : System.Web.UI.Page<br />{<br />  </span>
						<span style="COLOR: #0000ff">string</span>
						<span style="COLOR: #000000"> ConnectionString </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">@"</span>
						<span style="COLOR: #000000">Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|aspxWeb.mdb;Persist Security Info=True</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">;<br />  OleDbConnection cn1;<br /><br /><br />  </span>
						<span style="COLOR: #0000ff">protected</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> Page_Load( </span>
						<span style="COLOR: #0000ff">object</span>
						<span style="COLOR: #000000"> sender, EventArgs e )<br />  {<br />    </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (</span>
						<span style="COLOR: #000000">!</span>
						<span style="COLOR: #000000">Page.IsPostBack)<br />    {<br />      OleDbConnection cn </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> OleDbConnection(ConnectionString);<br />      cn.Open();<br />      cn1 </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> OleDbConnection(ConnectionString);<br />      cn1.Open();<br />      OleDbCommand cmd </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> OleDbCommand(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">select * from [Subject]</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">, cn);<br />      OleDbDataReader dr </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> cmd.ExecuteReader(CommandBehavior.CloseConnection);<br />      MasterGridView.DataSource </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> dr;<br />      MasterGridView.DataBind();<br />      dr.Close();<br />      cmd.Dispose();<br />      cn.Dispose();<br />      cn1.Dispose();<br />      cn </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> cn1 </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">null</span>
						<span style="COLOR: #000000">;<br />    }<br />  }<br />  </span>
						<span style="COLOR: #0000ff">protected</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> MasterGridView_RowDataBound( </span>
						<span style="COLOR: #0000ff">object</span>
						<span style="COLOR: #000000"> sender, GridViewRowEventArgs e )<br />  {<br />    </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (e.Row.RowType </span>
						<span style="COLOR: #000000">==</span>
						<span style="COLOR: #000000"> DataControlRowType.DataRow)<br />    {<br /><br />      GridView oGridView </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> (GridView)e.Row.FindControl(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">DetailGridView</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">);<br />      </span>
						<span style="COLOR: #0000ff">if</span>
						<span style="COLOR: #000000"> (oGridView </span>
						<span style="COLOR: #000000">!=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">null</span>
						<span style="COLOR: #000000">)<br />      {<br />        OleDbCommand cmd </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">new</span>
						<span style="COLOR: #000000"> OleDbCommand(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">select top 10 * from Document Where pid = </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> MasterGridView.DataKeys[e.Row.RowIndex].Value, cn1);<br />        OleDbDataReader dr1 </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> cmd.ExecuteReader();<br />        oGridView.DataSource </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> dr1;<br />        oGridView.DataBind();<br />        dr1.Close();<br />        cmd.Dispose();<br />      }<br />    }<br />  }<br /><br />  </span>
						<span style="COLOR: #0000ff">protected</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> DetailGridView_RowDeleting( </span>
						<span style="COLOR: #0000ff">object</span>
						<span style="COLOR: #000000"> sender, GridViewDeleteEventArgs e )<br />  {<br />    GridView a </span>
						<span style="COLOR: #000000">=</span>
						<span style="COLOR: #000000"> (GridView)sender;<br />    Response.Write(</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">您要删除的记录是：&lt;font color='red'&gt;</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> a.DataKeys[e.RowIndex].Value.ToString() </span>
						<span style="COLOR: #000000">+</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TODO：执行删除动作</span>
						<span style="COLOR: #000000">"</span>
						<span style="COLOR: #000000">);<br />    </span>
						<span style="COLOR: #008000">//</span>
						<span style="COLOR: #008000"> TODO：执行删除动作</span>
						<span style="COLOR: #008000">
								<br />
						</span>
						<span style="COLOR: #000000">  }<br />  </span>
						<span style="COLOR: #0000ff">protected</span>
						<span style="COLOR: #000000"> </span>
						<span style="COLOR: #0000ff">void</span>
						<span style="COLOR: #000000"> DetailGridView_RowCommand( </span>
						<span style="COLOR: #0000ff">object</span>
						<span style="COLOR: #000000"> sender, GridViewCommandEventArgs e )<br />  {<br /><br />  }<br />}<br /></span>
				</div>
		</div>
		<p>
				<strong>注意：EnableViewState="true" 是必须的。</strong>
		</p>
<img src ="http://www.blogjava.net/qiuxing/aggbug/87933.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-12-15 14:02 <a href="http://www.blogjava.net/qiuxing/archive/2006/12/15/87933.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>ASP.NET 2.0中合并 GridView 的表头单元格</title><link>http://www.blogjava.net/qiuxing/archive/2006/12/15/87932.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Fri, 15 Dec 2006 06:00:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/12/15/87932.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/87932.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/12/15/87932.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/87932.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/87932.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: 在实际工作中，往往需要合并表格头部的单元格，下面就是一个实现的例子。运行结果如图：														C#																														&lt;%						...														@ Page Language								=								"								C#		...&nbsp;&nbsp;<a href='http://www.blogjava.net/qiuxing/archive/2006/12/15/87932.html'>阅读全文</a><img src ="http://www.blogjava.net/qiuxing/aggbug/87932.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-12-15 14:00 <a href="http://www.blogjava.net/qiuxing/archive/2006/12/15/87932.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>[转自李老师的博客]我很欣慰</title><link>http://www.blogjava.net/qiuxing/archive/2006/11/21/82617.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Tue, 21 Nov 2006 14:03:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/11/21/82617.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/82617.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/11/21/82617.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/82617.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/82617.html</trackback:ping><description><![CDATA[今天看了两个学生的博客，李曾鹰和邱新兴的。很勤奋的两个学生，也很努力。正走着十几年前我曾走过的路，满怀希望和憧憬。祝福他们！也想呼吁所有的学软件的同学：热爱技术吧，它也会爱你们的。<br />         也许是因为身在学校的缘故吧，竟然让我这个年逾三十已久的老人还能在这里谈技术。这也许也算是我能安心在这个并不肥沃的土地上依然耕耘不辍的原因之一吧。象牙塔里的技术毕竟纯粹，没有杂质，满足自己十几年的虚荣，可以幼稚地以为还停留在那个“程序员英雄”的时代。<br />         逝者如斯夫！ 
<p>转自：<a href="http://www.cnblogs.com/jplee/archive/2006/11/13/559612.html">http://www.cnblogs.com/jplee/archive/2006/11/13/559612.html</a></p><img src ="http://www.blogjava.net/qiuxing/aggbug/82617.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-11-21 22:03 <a href="http://www.blogjava.net/qiuxing/archive/2006/11/21/82617.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>MyEclipse+struts+Hibernate配置开发 </title><link>http://www.blogjava.net/qiuxing/archive/2006/11/13/80799.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Mon, 13 Nov 2006 00:30:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/11/13/80799.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/80799.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/11/13/80799.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/80799.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/80799.html</trackback:ping><description><![CDATA[说明：<br /><br />　　这个手册只是为初学者制作的环境配置和快速开发的一些基本方法，为的是广大爱好者能快速上手，少走我走过的弯路，里面没有任何关于java模式和其他相关的说明。本人水平有限，也没有能力去讨论关于模式设计和开发细节的一些内容。 
<p> </p><p> </p><p>　　建议：<br /><br />　　如果你还不清楚struts和hibernate的一些基本原理，希望能先去了解一下这方面的相关内容。</p><p>　　推荐：<br /><br />　　Hibernate中文手册》作者认为要学Hibernate看这个就足够了，里面几乎包括了所有的细节，不过可能不太适合快速入门。<br /><br />　　地址：<a href="http://www.hibernate.org/hib_docs/v3/reference/zh-%20cn/html_single/">http://www.hibernate.org/hib_docs/v3/reference/zh- cn/html_single/</a><br /><br />　　关于struts的资料就很多了，这里推荐一个可以下载一些入门教程的网站。<br /><br />　　地址：<a href="http://www.wnetw.com/jclub/index.jsp">http://www.wnetw.com/jclub/index.jsp</a><br /><br />　　强烈建议入门的朋友先了解一下基本的原理！否则本文可能对你没有任何帮助。</p><p>　　相关工具下载：（注意版本）<br /><br />　　mysql5.0 <a href="http://www.mysql.org/">http://www.mysql.org</a><br />　　eclipse 3.1.1 <a href="http://www.eclipse.org/" target="_blank">http://www.eclipse.org</a><br />　　myeclipse4.0.3 <a href="http://www.myeclipseide.com/">http://www.myeclipseide.com</a><br />　　tomcat5.5</p><p>　　安装：<br /><br />　　关于tomcat和mysql的安装就不多说了，需要注意的是最好保证你的 jdk是1.5的版本，并配置好你的环境变量，不然可能会遇到一些问题。<br /><br />　　把eclipse解开，再去安装刚下载的myeclipse，在安装的时候需要把路径指定到刚才解开的eclipse上，由于myeclipse是个收费软件，所以需要注册。不过一般按照Chinese的习惯，去google一个注册码就可以了:}</p><p>　　开发环境部署：<br /><br />　　好了，现在保证你的mysql和tomcat服务能够正常启动，myeclipse能够正常打开（如果不能，可以去找一下相关的说明或者给作者留言）。下面我们就要开始真正的开始部署一个传说中的tomcat+struts+hibernate+mysql结构的工程了！（faint!前言就写的我好累）<br /><br />　　首先，在myeclipse里新建一个工程。在左边的Package Exporler面版里点右键选择new-&gt;project… <br /><br />　　在跳出菜单里选择MyEclipse-&gt;J2EE Projects-&gt;Web Project。<br /><br />　　点击next后进入如下画面：</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/3dv4s4cjwa2l.cn/pic/3fa10d830200006m" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/1.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/1.JPG" target="_blank"></a></p><p><br />　　工程名为：test<br /><br />　　结束后点击Finish。<br /><br />　　好了，如果成功的话你就会在 Package Exporler里看到一个新的test工程！现在我们先配置一下数据库方面的东西。首先在你的mysql 里建立一个数据库webases，再在里面新建一个表admin，里面三个字段分别为id,<a class="bluekey" href="http://www.yesky.com/key/99/160099.html" target="_blank">name</a>,password其中id为自动取值的主键（mysql具体的操作可以自己找资料，不是本文涉及范围）。<br /><br />　　再回到myeclipse ，选中window-&gt;Open Perspective-&gt;Other…<br /><br />　　可以看到现在跳出一个名为Select Perspective的菜单，在里面选中MyEclipse Databases Exporler，可以看到现在到了下面的页面。</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/2s5d31zdm346.cn/pic/3fa10d830200006n" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/2.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/2.JPG" target="_blank"></a></p><p>　　按以上图示输入相关字段后点击Finish便建立了一个数据库连接，在新出现的JDBC for Mysql上点右键，选择Open connection…，确认用户名和密码正确后点OK，如果一切顺利的话你会看到下面的画面： </p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/0g601v5hykhy.cn/pic/3fa10d830200006o" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/3.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/3.JPG" target="_blank"></a></p><p>　　这说明你已经和数据库建立了正确的连接。现在我们再回到window-&gt;Open Perspective- &gt;Other…里的MyEclipse，也就是我们刚进来的时候看到的画面。<br /><br />　　右键点击你刚建立的工程 test并选择MyEclipse-&gt;Add struts Capabilities…在跳出的菜单里按照如下输入并确定：</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/r8rfzry4u70v.cn/pic/3fa10d830200006p" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/4.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/4.JPG" target="_blank"></a></p><p>　　好了，现在你已经为你的工程增加了struts，接下来和上面一样在右键工程后选择MyEclipse- &gt;Add Hibernate Capabilities…一路确定下来为你的工程添加Hibernate。（为方便起见我们在选择路径时把HibernateSessionFactory.java放在了src/com下面，其实最好建立个单独的目录如 src/com/hibernate）<br /><br />　　为了更好的演示我们不建立通常的登陆页面而是建立个注册页面。选择 src目录下的hibernate.cfg.xml文件。照如下填写并保存。这样hibernate就为你建立了数据库的连接池。</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/w9r22908kj35.cn/pic/3fa10d830200006q" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/5.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/5.JPG" target="_blank"></a></p><p>　　下面我们再选择WebRoot/WEB-INF/struts-config.xml文件，在画面中点击右键选择new- &gt;Form, Action and JSP。如下填写</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/w0cu77s737rz.cn/pic/3fa10d830200006r" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/6.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/6.JPG" target="_blank"></a><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/5.JPG" target="_blank"></a></p><p>　　再选择JSP选项，如下</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/1x6mi889p265.cn/pic/3fa10d830200006s" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/7.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/7.JPG" target="_blank"></a><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/6.JPG" target="_blank"></a></p><p>　　最后选择Finish。<br /><br />　　再新建一个一个success.jsp的页面，<br /><br />　　在刚才struts- config.xml文件里右键<a class="bluekey" href="http://www.yesky.com/key/1712/156712.html" target="_blank">选择a</a>ddAdmin选择Properties，在菜单里选择Forwords，再点add，如下图填写 </p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/55rct6wh32c3.cn/pic/3fa10d830200006t" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/8.JPG" target="_blank"></a></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/8.JPG" target="_blank"></a><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/7.JPG" target="_blank"></a></p><p>　　最后你的struts-config.xml就是下面这个样子：</p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/9.JPG" target="_blank"></a><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/8.JPG" target="_blank"></a></p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/17nf5q9p44y5.cn/pic/3fa10d830200006u" /></p><p><br />　　下面我们转到hibernate。换到刚才我们建立数据库的页面，选择你的admin的表点右键选择Create Hibernate Mapping。选择好打包路径后选择Finish。如图：</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/k8h07y72ok59.cn/pic/3fa10d830200006v" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/10.JPG" target="_blank"></a></p><p>　　在你刚才选择的路径下（我为方便是src/com/yourcompanyname/）下新建立的文件 AdminDAOFactory.java文件并输入以下内容：</p><p>package com.yourcompanyname;</p><p>import java.util.Iterator;</p><p>import org.hibernate.HibernateException;<br />import org.hibernate.Query;<br />import org.hibernate.Session;<br />import org.hibernate.Transaction;</p><p>import com.hibernate.SessionFactory;</p><p>public class AdminDAOFactory {<br /> Session session;<br /> Transaction tx;<br /> public void add(Admin admin) throws HibernateException {<br />  /**<br />   * Creation Date: 11-17-2005<br />   * TODO Add a new admin user.<br />   * @param An object of Admin<br />   * @return void<br />   * @author Coder Guo<br />   */<br />  try {<br />   session = SessionFactory.currentSession();<br />   tx = session.beginTransaction();<br />   //Add a new admin<br />   session.save(admin);<br />   tx.commit ();<br />  }catch(HibernateException e){<br />   throw e;<br />  }finally{<br />   if (tx!=null) {<br />    tx.rollback();<br />   } <br />   SessionFactory.closeSession();<br />  }<br /> }<br />}</p><p> 再打开com.yourcompany.struts.action下的AddAdminAction.java添加（其中如果有错误选中好按ctrl+shift+o自动添加包）</p><p>public class AddAdminAction extends Action {</p><p> // --------------------------------------------------------- Instance Variables</p><p> // --------------------------------------------------------- Methods</p><p> /** <br />  * Method execute<br />  * @param mapping<br />  * @param form<br />  * @param request<br />  * @param response<br />  * @return ActionForward<br />  * @author Coder Guo<br />  */<br /> public ActionForward execute(<br />  ActionMapping mapping,<br />  ActionForm form,<br />  HttpServletRequest request,<br />  HttpServletResponse response) {<br />  AddAdminForm addAdminForm = (AddAdminForm) form;<br />  <br />  // TODO Add a new admin<br />  Admin admin = new Admin();<br />  admin.setName(addAdminForm.getName ());<br />  admin.setPassword(addAdminForm.getPassword ());<br />  AdminDAOFactory adminDAO = new AdminDAOFactory ();<br />  adminDAO.add(admin);<br />  <br />  return mapping.findForward("success");<br /> }</p><p>}</p><p> 再打开com.yourcompanyname.struts.form下的AddAdminForm.java，修改（如果有错误按照上面说的方法导入包）<br /> public ActionErrors validate(<br />  ActionMapping mapping,<br />  HttpServletRequest request) {</p><p>  // TODO Auto-generated method stub<br />  ActionErrors errors = new ActionErrors();<br />  <br />  Session session = SessionFactory.currentSession();<br />  Transaction tx = session.beginTransaction ();<br />  Query query = session.createQuery("select admin from Admin as admin where admin.name = '" + this.name + "'");<br />  Iterator it = query.iterate ();<br />  if (it.hasNext()){<br />   errors.add ("addAdmin.err.name",new ActionMessage("form.addAdmin.err.name"));<br />  } <br />  tx.commit();<br />  SessionFactory.closeSession ();<br />  return errors;<br /> }</p><p> public void reset(ActionMapping mapping, HttpServletRequest request) {</p><p>  // TODO Auto-generated method stub<br />  this.name=null;<br />  this.password=null;<br /> }</p><p>　　再打开com\yourcompanyname\struts下的ApplicationResource.properties在这里面添加错误信息： <br /><br />Form.addAdmin.err.name=err</p><p>　　最后，（汗，好累啊-_-!）打开addAdmin.jsp修改成如下：<br /><br />&lt;%@ page contentType="text/html; charset=utf-8"%&gt; <br />&lt;%@ page language="java"%&gt;<br />&lt;%@ taglib uri="<a href="http://jakarta.apache.org/struts/tags-bean">http://jakarta.apache.org/struts/tags-bean</a>" prefix="bean"%&gt; <br />&lt;%@ taglib uri="<a href="http://jakarta.apache.org/struts/tags-html">http://jakarta.apache.org/struts/tags-html</a>" prefix="html"%&gt;</p><p>&lt;script language = "javascript"&gt;<br />&lt;!--<br />function <a class="bluekey" href="http://www.yesky.com/key/4908/159908.html" target="_blank">check</a>(){<br /> if (loginForm.userName.value == "" || loginForm.password.value == ""){<br />  alert("请输入完整的信息！");<br />  loginForm.userName.focus();<br />  return false;<br /> }<br />}<br />//--&gt;<br />&lt;/script&gt;<br /> <br /> &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;<br />&lt;html:html&gt;<br />  &lt;head&gt;<br />    &lt;html:base /&gt;<br />    <br />    &lt;title&gt;login.jsp&lt;/title&gt;<br />    &lt;link href="css/webcss.css" rel="stylesheet" type="text/css"&gt;<br />    <br />    &lt;<a class="bluekey" href="http://www.yesky.com/key/4816/159816.html" target="_blank">meta</a> http-equiv="pragma" content="no- cache"&gt;<br />    &lt;meta http-equiv="cache-control" content="no- cache"&gt;<br />    &lt;meta http-equiv="expires" content="0"&gt;    <br />    &lt;meta http-equiv="keywords" content="keyword1,keyword2,keyword3"&gt;<br />    &lt;meta http- equiv="description" content="This is my page"&gt;<br />  &lt;/head&gt;<br />  </p><p>  &lt;body&gt;<br />  &lt;center&gt;<br />   &lt;p&gt;&amp;nbsp;&lt;/p&gt;<br />   &lt;p&gt;&amp;nbsp;&lt;/p&gt;<br />   &lt;table width="<a class="bluekey" href="http://www.yesky.com/key/636/160636.html" target="_blank">30</a>0" border="0" cellpadding="0" cellspacing="0"&gt;<br />   &lt;html:form action="/addAdmin" focus="name" method="GET"&gt;<br />     &lt;tr align="center" valign="middle"&gt;<br />       &lt;td colspan="2" class="typt_normal"&gt;新增管理员&lt;/td&gt;<br />     &lt;/tr&gt;<br />     &lt;tr&gt;<br />       &lt;td width="100" align="center" valign="middle" class="typt_normal"&gt;名称： &lt;/td&gt;<br />       &lt;td width="200" align="left"&gt;&lt;html:text property="name" styleClass="text_s"/&gt;&lt;html:errors property="addAdmin.err.name"/&gt;&lt;/td&gt;<br />     &lt;/tr&gt;<br />     &lt;tr&gt;<br />       &lt;td width="100" align="center" valign="middle" class="typt_normal"&gt;密码： &lt;/td&gt;<br />       &lt;td width="200" align="left"&gt;&lt;html:password property="password" styleClass="text_s"/&gt;&lt;/td&gt;<br />     &lt;/tr&gt;<br />     &lt;tr&gt; <br />       &lt;td colspan="2" align="center" valign="middle"&gt;&lt;html:submit value="提交" onclick="return check ();"/&gt;&lt;html:reset value="重置"&gt;&lt;/html:reset&gt;&lt;/td&gt;<br />       &lt;/tr&gt;<br /> &lt;/html:form&gt;<br />   &lt;/table&gt;<br /> &lt;/center&gt;<br /> &lt;/body&gt;</p><p>&lt;/html:html&gt;<br /><br />　　其中可以看到如何在struts的标签中使用javascript的方法。<br /><br />　　配置好myeclipse于tomcat的连接。在window-&gt;Preferences做如下设定：</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/rfe9mz6n6877.cn/pic/3fa10d830200006w" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/11.JPG" target="_blank"></a></p><p>　　在项目文件点右键－&gt;“myeclipse”－&gt;“Add and remove project deployment”，如下图：</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/4el6k0a08339.cn/pic/3fa10d830200006x" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/12.JPG" target="_blank"></a></p><p>　　好了，我们的配置工作基本结束了,在myeclipse上开启tomcat服务</p><p align="center"><img alt="" src="http://dev.yesky.com/imagelist/05/12/a597a7j21uhi.cn/pic/3fa10d830200006y" /></p><p><a href="file:///E:/我的文章/MyEclipse+TomCat+struts+Hibernate+Mysql环境配置手册和快速开发实例/pic/13.JPG" target="_blank"></a></p><p>　　现在打开浏览器，输入<br /><br />　　<a href="http://127.0.0.1:8080/test/addAdmin.jsp">http://127.0.0.1:8080/test/addAdmin.jsp</a><strong r="">就可以看到你的jsp页面了！</strong></p> <br /><img src ="http://www.blogjava.net/qiuxing/aggbug/80799.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-11-13 08:30 <a href="http://www.blogjava.net/qiuxing/archive/2006/11/13/80799.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>资源.Eclipse.相关插件下载地址</title><link>http://www.blogjava.net/qiuxing/archive/2006/11/07/79709.html</link><dc:creator>星星</dc:creator><author>星星</author><pubDate>Tue, 07 Nov 2006 14:32:00 GMT</pubDate><guid>http://www.blogjava.net/qiuxing/archive/2006/11/07/79709.html</guid><wfw:comment>http://www.blogjava.net/qiuxing/comments/79709.html</wfw:comment><comments>http://www.blogjava.net/qiuxing/archive/2006/11/07/79709.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/qiuxing/comments/commentRss/79709.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/qiuxing/services/trackbacks/79709.html</trackback:ping><description><![CDATA[Eclipse下载<br />EMF,GEF - Graphical Editor Framework,UML2,VE - Visual Editor都在这里下载<br /><a href="http://www.eclipse.org/downloads/index.php"><font color="#000000">http://www.eclipse.org/downloads/index.php</font></a><p>2  lomboz J2EE插件,开发JSP,EJB<br /><a href="http://forge.objectweb.org/projects/lomboz"><font color="#000000">http://forge.objectweb.org/projects/lomboz</font></a><br /></p><p>3  MyEclipse J2EE开发插件，支持SERVLET/JSP/EJB/数据库操纵等 <br /><a href="http://www.myeclipseide.com/"><font color="#000000">http://www.myeclipseide.com</font></a></p><p>4  Properties Editor  编辑java的属性文件，并可以自动存盘为Unicode格式 <br /><a href="http://propedit.sourceforge.jp/index_en.html"><font color="#000000">http://propedit.sourceforge.jp/index_en.html</font></a></p><p>5  Colorer Take  为上百种类型的文件按语法着色 <br /><a href="http://colorer.sourceforge.net/"><font color="#000000">http://colorer.sourceforge.net/</font></a></p><p>6  XMLBuddy 编辑xml文件<br /><a href="http://www.xmlbuddy.com/"><font color="#000000">http://www.xmlbuddy.com</font></a></p><p>7  Code Folding  加入多种代码折叠功能（比eclipse自带的更多） <br /><a href="http://www.coffee-bytes.com/servlet/PlatformSupport"><font color="#000000">http://www.coffee-bytes.com/servlet/PlatformSupport</font></a></p><p>8  Easy Explorer  从eclipse中访问选定文件、目录所在的文件夹 <br /><a href="http://easystruts.sourceforge.net/"><font color="#000000">http://easystruts.sourceforge.net/</font></a></p><p>9  Fat Jar 打包插件，可以方便的完成各种打包任务，可以包含外部的包等 <br /><a href="http://fjep.sourceforge.net/"><font color="#000000">http://fjep.sourceforge.net/</font></a></p><p>10  RegEx Test 测试正则表达式 <br /><a href="http://brosinski.com/stephan/archives/000028.php"><font color="#000000">http://brosinski.com/stephan/archives/000028.php</font></a></p><p>11  JasperAssistant 报表插件(要钱的哦～)<br /><a href="http://www.jasperassistant.com/"><font color="#000000">http://www.jasperassistant.com/</font></a></p><p>12  Jigloo GUI Builder JAVA的GUI编辑插件 <br /><a href="http://cloudgarden.com/jigloo/"><font color="#000000">http://cloudgarden.com/jigloo/</font></a></p><p>13  Profiler 性能跟踪、测量工具，能跟踪、测量B/S程序 <br /><a href="http://sourceforge.net/projects/eclipsecolorer/"><font color="#000000">http://sourceforge.net/projects/eclipsecolorer/</font></a></p><p>14  AdvanQas 提供对if/else等条件语句的提示和快捷帮助(自动更改结构等)<br /><a href="http://eclipsecolorer.sourceforge.net/advanqas/index.html"><font color="#000000">http://eclipsecolorer.sourceforge.net/advanqas/index.html</font></a></p><p>15  Log4E Log4j插件，提供各种和Log4j相关的任务，如为方法、类添加一个logger等 <br /><a href="http://log4e.jayefem.de/index.php/Main_Page"><font color="#000000">http://log4e.jayefem.de/index.php/Main_Page</font></a></p><p>16  VSSPlugin VSS插件 <br /><a href="http://sourceforge.net/projects/vssplugin"><font color="#000000">http://sourceforge.net/projects/vssplugin</font></a></p><p>17  Implementors 提供跳转到一个方法的实现类，而不是接口的功能（实用!） <br /><a href="http://eclipse-tools.sourceforge.net/implementors/"><font color="#000000">http://eclipse-tools.sourceforge.net/implementors/</font></a></p><p>18  Call Hierarchy 显示一个方法的调用层次（被哪些方法调，调了哪些方法） <br /><a href="http://eclipse-tools.sourceforge.net/call-hierarchy/index.html"><font color="#000000">http://eclipse-tools.sourceforge.net/call-hierarchy/index.html</font></a></p><p>19  EclipseTidy 检查和格式化HTML/XML文件 <br /><a href="http://eclipsetidy.sourceforge.net/"><font color="#000000">http://eclipsetidy.sourceforge.net/</font></a></p><p>20  Checkclipse 检查代码的风格、写法是否符合规范 <br /><a href="http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm"><font color="#000000">http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm</font></a></p><p>21  Hibernate Synchronizer Hibernate插件，自动映射等 <br /><a href="http://www.binamics.com/hibernatesync/"><font color="#000000">http://www.binamics.com/hibernatesync/</font></a></p><p>22  VeloEclipse  Velocity插件 <br /><a href="http://propsorter.sourceforge.net/"><font color="#000000">http://propsorter.sourceforge.net/</font></a> <br />  <br />23  EditorList 方便的列出所有打开的Editor <br /><a href="http://editorlist.sourceforge.net/"><font color="#000000">http://editorlist.sourceforge.net/</font></a> <br />  <br />24  MemoryManager 内存占用率的监视 <br /><a href="http://cloudgarden.com/memorymanager/"><font color="#000000">http://cloudgarden.com/memorymanager/</font></a> <br /> <br />25  swt-designer java的GUI插件<br /><a href="http://www.swt-designer.com/"><font color="#000000">http://www.swt-designer.com/</font></a><br /> <br />26  TomcatPlugin 支持Tomcat插件 <br /><a href="http://www.sysdeo.com/eclipse/tomcatPlugin.html"><font color="#000000">http://www.sysdeo.com/eclipse/tomcatPlugin.html</font></a><br /> <br />27  XML Viewer <br /><a href="http://tabaquismo.freehosting.net/ignacio/eclipse/xmlview/index.html"><font color="#000000">http://tabaquismo.freehosting.net/ignacio/eclipse/xmlview/index.html</font></a><br /> <br />28  quantum 数据库插件<br /><a href="http://quantum.sourceforge.net/"><font color="#000000">http://quantum.sourceforge.net/</font></a><br /> <br />29  Dbedit 数据库插件<br /><a href="http://sourceforge.net/projects/dbedit"><font color="#000000">http://sourceforge.net/projects/dbedit</font></a><br /> <br />30  clay.core 可视化的数据库插件 <br /><a href="http://www.azzurri.jp/en/software/index.jsp"><font color="#000000">http://www.azzurri.jp/en/software/index.jsp</font></a><br /><a href="http://www.azzurri.jp/eclipse/plugins"><font color="#000000">http://www.azzurri.jp/eclipse/plugins</font></a><br /> <br />31  hiberclipse hibernate插件 <br /><a href="http://hiberclipse.sourceforge.net/"><font color="#000000">http://hiberclipse.sourceforge.net</font></a><br /><a href="http://www.binamics.com/hibernatesync"><font color="#000000">http://www.binamics.com/hibernatesync</font></a><br /> <br />32  struts-console Struts插件<br /><a href="http://www.jamesholmes.com/struts/console/"><font color="#000000">http://www.jamesholmes.com/struts/console/</font></a><br /> <br />33  easystruts Struts插件<br /><a href="http://easystruts.sourceforge.net/"><font color="#000000">http://easystruts.sourceforge.net</font></a> <br /> <br />34  veloedit Velocity插件<br /><a href="http://veloedit.sourceforge.net/"><font color="#000000">http://veloedit.sourceforge.net/</font></a><br /> <br />35  jalopy 代码整理插件<br /><a href="http://jalopy.sourceforge.net/"><font color="#000000">http://jalopy.sourceforge.net/</font></a><br /> <br />36  JDepend 包关系分析<br /><a href="http://andrei.gmxhome.de/jdepend4eclipse/links.html"><font color="#000000">http://andrei.gmxhome.de/jdepend4eclipse/links.html</font></a><br /> <br />37  Spring IDE Spring插件<br /><a href="http://springide-eclip.sourceforge.net/updatesite/"><font color="#000000">http://springide-eclip.sourceforge.net/updatesite/</font></a><br /> <br />38  doclipse 可以产生xdoclet 的代码提示<br /><a href="http://beust.com/doclipse/"><font color="#000000">http://beust.com/doclipse/</font></a></p><p>39  SQLExplorer,在Eclipse 中连接各种数据库进行操作使用<br /><a href="http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=124&amp;threadID=31124" target="_blank"><font color="#000000">http://dev2dev.bea.com.cn/bbs/thread.jspa?forumID=124&amp;threadID=31124</font></a></p><p><font size="2">JSEclipse<br /></font></p><div>插件主页：<a href="http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/"><font color="#000000">http://www.interaktonline.com/Products/Eclipse/JSEclipse/Overview/</font></a></div><div>插件介绍：JSEclipse是个Eclipse下的免费Javascript脚本编辑器<br /><br />subversion<br />版本控制，相当于CVS<br />安装：<a href="http://subclipse.tigris.org/install.html"><font color="#000000">http://subclipse.tigris.org/install.html</font></a><br /><font size="2">Name: Subclipse<br />URL:  http://subclipse.tigris.org/update_1.0.x<br /><br /><br /></font>CSS Editor for Eclipse<br /><a href="http://csseditor.sourceforge.net/"><font color="#000000">http://csseditor.sourceforge.net/</font></a><br /><br />FacesIDE<br />FacesIDE是一个用于开发JSF的Eclispe插件.它可以可视化编辑faces-config.xml文件并且提供代码编辑与校验,预览JSF的JSP文件.FacesIDE包含MyFaces来作为JSF的实现<br /><a href="http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=FacesIDE"><font color="#000000" size="2">http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=FacesIDE</font></a><br /><br /><span><font size="2">Eclipse SQLExplorer plugin<br />一个数据库管理插件<br /></font></span><a href="http://sourceforge.net/projects/eclipsesql"><font color="#000000" size="2">http://sourceforge.net/projects/eclipsesql</font></a><br /><br /><font size="2">Poperties Editor<br />一个在编辑完成后可以将资源文件中的中文编码格式转换为unicode编码的插件，在开发国际化应用程序的时候非常有用<br /></font><a href="http://propedit.sourceforge.jp/eclipse/updates/"><font color="#000000" size="2">http://propedit.sourceforge.jp/eclipse/updates/</font></a></div><p><font size="2">eclipseME<br />  </font><a href="http://eclipseme.org/updates/"><font color="#000000"><font size="2">http://eclipseme.org/updates/</font></font></a><br /></p><p><font size="2">Eclipse加速插件KeepResident</font><a href="http://suif.stanford.edu/pub/keepresident/"><br /><font color="#000000"><font size="2">http://suif.stanford.edu/pub/keepresident/</font></font></a><br /><font size="2"> <br />MyEclipse  J2EE开发插件，支持SERVLET/JSP/EJB/数据库操纵等<br /></font><a href="http://www.myeclipseide.com/"><font color="#000000"><font size="2">www.myeclipseide.com</font></font></a><br /><font size="2"> <br />Properties Editor  编辑java的属性文件，并可以自动存盘为Unicode格式<br /></font><a href="http://propedit.sourceforge.jp/index_en.html"><font color="#000000"><font size="2">http://propedit.sourceforge.jp/index_en.html</font></font></a><br /><a href="http://propedit.sourceforge.jp/eclipse/updates/"><font color="#000000"><font size="2">http://propedit.sourceforge.jp/eclipse/updates/</font></font></a><br /><font size="2"> <br />Colorer Take  为上百种类型的文件按语法着色<br /></font><a href="http://colorer.sourceforge.net/"><font color="#000000"><font size="2">http://colorer.sourceforge.net/</font></font></a><br /><font size="2"> <br />XMLBuddy 编辑xml文件<br /></font><a href="http://www.xmlbuddy.com/"><font color="#000000"><font size="2">www.xmlbuddy.com</font></font></a><br /><font size="2"> <br />Code Folding  加入多种代码折叠功能（比eclipse自带的更多）<br /></font><a href="http://www.coffee-bytes.com/servlet/PlatformSupport"><font color="#000000"><font size="2">http://www.coffee-bytes.com/servlet/PlatformSupport</font></font></a><br /><font size="2"> <br />Easy Explorer  从eclipse中访问选定文件、目录所在的文件夹<br /></font><a href="http://easystruts.sourceforge.net/"><font color="#000000"><font size="2">http://easystruts.sourceforge.net/</font></font></a><br /><font size="2"> <br />Fat Jar 打包插件，可以方便的完成各种打包任务，可以包含外部的包等<br /></font><a href="http://fjep.sourceforge.net/"><font color="#000000"><font size="2">http://fjep.sourceforge.net/</font></font></a><br /><font size="2"> <br />RegEx Test 测试正则表达式<br /></font><a href="http://brosinski.com/stephan/archives/000028.php"><font color="#000000"><font size="2">http://brosinski.com/stephan/archives/000028.php</font></font></a><br /><font size="2"> <br />JasperAssistant 报表插件（强，要钱的）<br /></font><a href="http://www.jasperassistant.com/"><font color="#000000"><font size="2">http://www.jasperassistant.com/</font></font></a><br /><font size="2"> <br />Jigloo GUI Builder ＪＡＶＡ的ＧＵＩ编辑插件<br /></font><a href="http://cloudgarden.com/jigloo/"><font color="#000000"><font size="2">http://cloudgarden.com/jigloo/</font></font></a><br /><font size="2"> <br />Profiler 性能跟踪、测量工具，能跟踪、测量ＢＳ程序<br /></font><a href="http://sourceforge.net/projects/eclipsecolorer/"><font color="#000000"><font size="2">http://sourceforge.net/projects/eclipsecolorer/</font></font></a><br /><font size="2"> <br />AdvanQas 提供对if/else等条件语句的提示和快捷帮助（自动更改结构等）<br /></font><a href="http://eclipsecolorer.sourceforge.net/advanqas/index.html"><font color="#000000"><font size="2">http://eclipsecolorer.sourceforge.net/advanqas/index.html</font></font></a><br /><font size="2"> <br />Log4E     Log4j插件，提供各种和Log4j相关的任务，如为方法、类添加一个logger等<br /></font><a href="http://log4e.jayefem.de/index.php/Main_Page"><font color="#000000"><font size="2">http://log4e.jayefem.de/index.php/Main_Page</font></font></a><br /><font size="2"> <br />VSSPlugin VSS插件<br /></font><a href="http://sourceforge.net/projects/vssplugin"><font color="#000000"><font size="2">http://sourceforge.net/projects/vssplugin</font></font></a><br /><font size="2"> <br />Implementors   提供跳转到一个方法的实现类，而不是接中的功能（实用!）<br /></font><a href="http://eclipse-tools.sourceforge.net/implementors/"><font color="#000000"><font size="2">http://eclipse-tools.sourceforge.net/implementors/</font></font></a><br /><font size="2"> <br />Call Hierarchy 显示一个方法的调用层次（被哪些方法调，调了哪些方法）<br /></font><a href="http://eclipse-tools.sourceforge.net/call-hierarchy/index.html"><font color="#000000"><font size="2">http://eclipse-tools.sourceforge.net/call-hierarchy/index.html</font></font></a><br /><font size="2"> <br />EclipseTidy 检查和格式化HTML/XML文件<br /></font><a href="http://eclipsetidy.sourceforge.net/"><font color="#000000"><font size="2">http://eclipsetidy.sourceforge.net/</font></font></a><br /><font size="2"> <br />Checkclipse 检查代码的风格、写法是否符合规范<br /></font><a href="http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm"><font color="#000000"><font size="2">http://www.mvmsoft.de/content/plugins/checkclipse/checkclipse.htm</font></font></a><br /><font size="2"> <br />Hibernate Synchronizer Hibernate插件，自动映射等<br /></font><a href="http://www.binamics.com/hibernatesync/"><font color="#000000"><font size="2">http://www.binamics.com/hibernatesync/</font></font></a><br /><font size="2"> <br />spring updatesite 插件<br /></font><a href="http://springide.org/updatesite/"><font color="#000000"><font size="2">http://springide.org/updatesite/</font></font></a></p><p><font size="2">VeloEclipse  Velocity插件<br /></font><a href="http://propsorter.sourceforge.net/"><font color="#000000"><font size="2">http://propsorter.sourceforge.net/</font></font></a><br /><font size="2"> <br />EditorList   方便的列出所有打开的Editor<br /></font><a href="http://editorlist.sourceforge.net/"><font color="#000000"><font size="2">http://editorlist.sourceforge.net/</font></font></a><br /><font size="2"> <br />MemoryManager 内存占用率的监视<br /></font><a href="http://cloudgarden.com/memorymanager/"><font color="#000000"><font size="2">http://cloudgarden.com/memorymanager/</font></font></a><font size="2"></font></p><p><font size="2">Eclipse的游戏插件<br /></font><a href="http://eclipse-games.sourceforge.net/"><font color="#000000"><font size="2">http://eclipse-games.sourceforge.net/</font></font></a></p><p><font size="2">JBoss-IDE<br /></font><a href="http://jboss.sourceforge.net/jbosside/updates/"><font color="#000000"><font size="2">http://jboss.sourceforge.net/jbosside/updates/</font></font></a></p><p><font size="2">自动反编译class，安装后要设定class文件缺省关联到jode<br /></font><a href="http://www.technoetic.com/eclipse/update"><font color="#000000"><font size="2">http://www.technoetic.com/eclipse/update</font></font></a></p><p><br /><font size="2">jigloo swing/sw设计工具，里面自带的form/anchor布局很好用！<br /></font><a href="http://cloudgarden.soft-gems.net/update-site/"><font color="#000000"><font size="2">http://cloudgarden.soft-gems.net/update-site/</font></font></a></p><p><font size="2">jinto的资源文件编辑工具，同时编辑多种语言，而且自动转换成iso8859-1编码。很好用！<br /></font><a href="http://www.guh-software.de/eclipse/"><font color="#000000"><font size="2">http://www.guh-software.de/eclipse/</font></font></a></p><img src ="http://www.blogjava.net/qiuxing/aggbug/79709.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/qiuxing/" target="_blank">星星</a> 2006-11-07 22:32 <a href="http://www.blogjava.net/qiuxing/archive/2006/11/07/79709.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>