I have a form with 3 CA textboxes. All 3 have the PrintFullWebPage = True. Only one texbox includes the print icon. when I click the print icon in the cute editor textbox, the current texbox prints completely but I thought the entire webpage should print? My form is as follows:
<%@ Page Language="vb" Debug="true"%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<%@ Register TagPrefix="cutesoft" TagName="banner" Src="banner.ascx" %>
<%@ Register TagPrefix="cutesoft" TagName="leftmenu" Src="leftmenu.ascx" %>
<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
<html>
<head>
<title>District Operational Practices Forum 2006</title>
<link rel="stylesheet" href="../example.css" type="text/css" />
</head>
<body>
<form id="Form1" runat="server">
<table border="0" cellpadding="0" cellspacing="0" align="center" width="95%">
<tr>
<td valign="top" width="100%" style="text-align: center" align="center">
<strong><span style="font-size: 12pt"><strong>District Operational Practices Forum</strong> </span></strong>
<asp:Datagrid runat="server"
Id="MyDataGrid"
AllowPaging="True"
cellpadding="4"
Headerstyle-BackColor="#eeeeee"
Headerstyle-Font-Bold="True"
Width=650px
Font-Name="Arial"
Font-Size="10px"
AutogenerateColumns="False"
OnPageIndexChanged="MyDataGrid_Page"
OnItemCommand="UpdateItem" Font-Names="Arial" ForeColor="#333333" GridLines="None" AllowSorting="True">
<Columns>
<asp:BoundColumn DataField="EventID" Visible="False" />
<asp:BoundColumn DataField="EventID" HeaderText="ID" >
<ItemStyle Width="50px" />
</asp:BoundColumn>
<asp:BoundColumn DataField="Notes" HeaderText="Note" >
<ItemStyle Width="430px" />
</asp:BoundColumn>
<asp:BoundColumn DataField="UName" HeaderText="Scribe" >
<ItemStyle Width="120px" />
</asp:BoundColumn>
<asp:ButtonColumn CommandName="Edit" HeaderText="Edit" Text="Edit" >
<ItemStyle Width="50px" />
</asp:ButtonColumn>
</Columns>
<HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
<EditItemStyle BackColor="#FFFFC0" />
<SelectedItemStyle BackColor="#FFFFC0" Font-Bold="True" ForeColor="Blue" />
<PagerStyle BackColor="OldLace" ForeColor="Blue" HorizontalAlign="Center" Font-Size="Medium" Position="TopAndBottom" Mode="NumericPages" />
<AlternatingItemStyle BackColor="White" />
<ItemStyle BackColor="#E3EAEB" />
</asp:datagrid><br />
<asp:Button ID="btnUpdate2" runat="server" OnClick="Submit" Visible="False" />
<br />
<strong><span style="font-size: 10pt">Subject:</span></strong><asp:TextBox ID="Notes" runat="server" Width="552px" style="text-align: left"></asp:TextBox><br>
<strong><span style="font-size: 10pt">Scribe:</span></strong>
<asp:TextBox ID="Uname" runat="server" Width="552px" style="text-align: left"></asp:TextBox><br />
<br />
<strong><span style="font-size: 10pt">Main Points<br>
</span></strong>
<CE:Editor id="Editor2" EditorWysiwygModeCss="../example.css" TemplateItemList="Undo,Redo,Separator,Bold,Italic,Underline,Separator,JustifyLeft,JustifyCenter,JustifyRight,InsertUnorderedList,InsertOrderedList,Find,FontName,FontSize" Height="176px" runat="server" Width="95%" BreakElement="P" ShowBottomBar="False" ShowGroupMenuImage="False" CodeViewTemplateItemList="Save,Print,Cut,Copy,Paste,Find,ToFullPage,FromFullPage,SelectAll, InsertNumberedList,SelectNone" PrintFullWebPage="True" ActiveTab="View" ReadOnly="True" ThemeType="OfficeXP" >
<FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
CssClass="CuteEditorFrame" Height="100%" Width="100%" />
<TextAreaStyle BackColor="WhiteSmoke" />
</CE:Editor>
<br />
<strong><span style="font-size: 10pt">Attendees</span></strong><br />
<CE:Editor id="Editor3" EditorWysiwygModeCss="../example.css" TemplateItemList="Undo,Redo,Separator,Bold,Italic,Underline,Separator,JustifyLeft,JustifyCenter,JustifyRight,InsertUnorderedList,Find,FontName,FontSize" Height="176px" runat="server" Width="95%" BreakElement="P" ShowBottomBar="False" ShowGroupMenuImage="False" PrintFullWebPage="True" ActiveTab="View" ReadOnly="True" >
<FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
CssClass="CuteEditorFrame" Height="100%" Width="100%" />
</CE:Editor>
<br />
<CE:Editor id="Editor1" EditorWysiwygModeCss="../example.css" Autoconfigure="Full_noform" Height="650px" runat="server" Width="95%" BreakElement="P" PrintFullWebPage="True" ActiveTab="View" EditCompleteDocument="True" ReadOnly="True" >
<FrameStyle BackColor="Snow" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
CssClass="CuteEditorFrame" Height="100%" Width="100%" />
</CE:Editor><br/>
<asp:Button id="btnUpdate" onclick="Submit" Runat="server" Text="Add" Visible="False"></asp:Button>
<asp:Literal ID="Literal1" Runat="server" />
<br><br>
<input type="hidden" name="eventid" runat="server" id="eventid">
</td>
<tr>
</table>
</form>
</body>
</html>
<script runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
If Not Page.IsPostBack Then
'MyDataGrid.VirtualItemCount = "20"
BindData()
End If
End Sub
Sub BindData()
Dim sql As String = "Select EventID, Notes, MainPoints, Uname, Userlist from Events Order By Notes"
Dim conn As OleDbConnection = CreateConnection()
'Dim Cmd as New OleDbCommand(sql, conn)
'objDR=Cmd.ExecuteReader(system.data.CommandBehavior.CloseConnection)
'MyDataGrid.DataSource = objDR
' MyDataGrid.DataBind()
Dim Cmd As New OleDbCommand(sql, conn)
Dim myAdapter As New OleDbDataAdapter(Cmd)
Dim ds As New DataSet()
myAdapter.Fill(ds)
'Set the datagrid's datasource to the DataSet and databind
MyDataGrid.DataSource = ds
MyDataGrid.DataBind()
conn.Close()
End Sub
Sub UpdateItem(s As Object, e As DataGridCommandEventArgs )
Dim conn As OleDbConnection = CreateConnection()
'Check if the CommandName==Delete
If e.CommandName = "Delete" Then
Dim com As OleDbCommand = New OleDbCommand("DELETE FROM Events WHERE EventID = @id", conn)
com.Parameters.Add("id", e.Item.Cells(0).Text)
com.ExecuteNonQuery()
conn.Close()
else If (e.CommandName = "Edit") then
Dim com As OleDbCommand = New OleDbCommand("SELECT Body, Notes, MainPoints, UserList,Uname FROM Events WHERE EventID = @id", conn)
com.Parameters.Add("id", e.Item.Cells(0).Text)
Dim result As OleDbDataReader = com.ExecuteReader()
If result.Read() Then
'set the editor text
Editor1.Text = result.GetString(0)
Notes.Text = result.GetString(1)
Editor2.Text = result.GetString(2)
Editor3.Text = result.GetString(3)
Uname.text = result.GetString(4)
eventid.Value = e.Item.Cells(0).Text
btnUpdate.Text = "Update"
btnUpdate.Visible = True
btnUpdate2.Text = "Update"
btnUpdate2.Visible = True
Else
Editor1.Text = ""
eventid.Value = ""
btnUpdate.Text = ""
btnUpdate2.Text = ""
End If
result.Close()
End If
BindData
End Sub
Sub Submit(s As Object, e As System.EventArgs )
Dim conn As OleDbConnection = CreateConnection()
Dim com As OleDbCommand = Nothing
If Not eventid.Value = String.Empty Then
com = New OleDbCommand("UPDATE Events SET Body = @content, Notes = @Notes, MainPoints =@Editor2, UserList= @Editor3, UName= @Uname WHERE EventID = @id", conn)
com.Parameters.Add("content", Editor1.Text)
com.Parameters.Add("Notes", Notes.Text)
com.Parameters.Add("MainPoints", Editor2.Text)
com.Parameters.Add("Userlist", Editor3.Text)
com.Parameters.Add("UName", Uname.Text)
com.Parameters.Add("id", Convert.ToInt32(eventid.Value))
com.ExecuteNonQuery()
conn.Close()
Else
com = New OleDbCommand("INSERT INTO Events (EventDate, Notes) VALUES (Date(), @content)", conn)
com.Parameters.Add("content", Editor1.Text)
com.ExecuteNonQuery()
conn.Close()
End If
BindData
Me.Response.Redirect(Me.Request.Url.PathAndQuery)
End Sub
Function CreateConnection() As OleDbConnection
Dim conn As OleDbConnection = New OleDbConnection
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Context.Server.MapPath("../uploads/Northwind.mdb") + ";"
conn.Open()
Return conn
End Function
Sub MyDataGrid_Page(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs)
MyDataGrid.CurrentPageIndex = e.NewPageIndex
BindData()
End Sub
Sub MyDataGrid_PageChanger(ByVal Source As Object, ByVal e As DataGridPageChangedEventArgs)
' Set the CurrentPageIndex before binding the grid
MyDataGrid.CurrentPageIndex = e.NewPageIndex
BindData()
End Sub
</script>