%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OLEDB" %>
")
Else
label.text=DSPageData_show.Tables("author_info").rows(0).item("author_name")&"文集"
info.text=replace(DSPageData_show.Tables("author_info").rows(0).item("info"),chr(13)," ")
link.text="查看该作者以往文集"
Dim DBCommand As OleDbDataAdapter
Dim DSPageData as New DataSet
DBCommand = New OleDbDataAdapter _
("Select * " _
& "from content where siteid = 7 and author Like '%"&DSPageData_show.Tables("author_info").rows(0).item("author_name")&"%'" _
& "order by pubtime desc", DBConn1)
DBCommand.Fill(DSPageData, _
"exhibition")
If DSPageData.Tables("exhibition").rows.Count=0 then
response.redirect("zuozhe.aspx?id="&Trim(Request.QueryString("id")))
Else
upload_datagrid.DataSource = _
DSPageData.Tables("exhibition").DefaultView
upload_datagrid.DataBind()
end if
end if
else
response.write("<"&"script>alert('没有该作者!');window.close()")
End if
'End If
End Sub
Sub Page_Change(sender As Object, e As DataGridPageChangedEventArgs)
if IsNumeric(Trim(Request.QueryString("id"))) then
Dim DBconn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationSettings.AppSettings("ConnectionString"))
Dim DBconn1 As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationSettings.AppSettings("ConnectionString2"))
upload_datagrid.CurrentPageIndex = e.NewPageIndex
Dim DBCommand_show As OleDbDataAdapter
Dim DSPageData_show as New DataSet
DBCommand_show = New OleDbDataAdapter _
("Select * " _
& "From author_info where id = "&Trim(Request.QueryString("ID")) _
& "", DBConn)
DBCommand_show.Fill(DSPageData_show, _
"author_info")
If DSPageData_show.Tables("author_info").rows.Count=0 then
response.write("<"&"script>alert('没有该作者!');window.close()")
Else
label.text=DSPageData_show.Tables("author_info").rows(0).item("author_name")&"文集"
info.text=replace(DSPageData_show.Tables("author_info").rows(0).item("info"),chr(13)," ")
link.text="查看该作者以往文集"
Dim DBCommand As OleDbDataAdapter
Dim DSPageData as New DataSet
DBCommand = New OleDbDataAdapter _
("Select * " _
& "from content where siteid = 7 and author Like '%"&DSPageData_show.Tables("author_info").rows(0).item("author_name")&"%'" _
& "order by pubtime desc", DBConn1)
DBCommand.Fill(DSPageData, _
"exhibition")
upload_datagrid.DataSource = _
DSPageData.Tables("exhibition").DefaultView
upload_datagrid.DataBind()
end if
else
response.write("<"&"script>alert('没有该作者!');window.close()")
End if
End Sub
Function contentLink(ByVal id, ByVal pubtime,ByVal title)
dim pubyear,pubmonth,pubday
pubyear=year(pubtime).ToString
pubmonth=month(pubtime).ToString
pubday=day(pubtime).ToString
if len(pubmonth)=1 then pubmonth="0"+pubmonth
if len(pubday)=1 then pubday="0"+pubday
contentLink = ""+title+""
End Function