473,473 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

same server method being called regardless of sender

Hi everyone! What is happening is the method: sub_btnSubmitClicked is
being executed every time any other object with a Handler is executed.
I am trying not to use the withevents and handles method of adding
handles to objects (I think that is where my problem lies) . . . sorry
for the long post here is my codebehind and .aspx code. Thank you for
any assistance anyone can offer!

Ryan

Public Class registration_report
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected btnSubmit As HtmlButton
Protected lblError As Label
Protected dgRegistrations As DataGrid
Protected ddlView As DropDownList
Protected chkSelect As CheckBox

Dim strSQL As String

'NOTE: The following placeholder declaration is required by the
Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
If (Session.Contents("sLoggedInUser_UID") Is Nothing) Then
Response.Redirect("login.aspx")
End If

AddHandler ddlView.SelectedIndexChanged, AddressOf
sub_ddlViewSelectedIndexChanged
AddHandler btnSubmit.ServerClick, AddressOf
sub_btnSubmitClicked
AddHandler dgRegistrations.EditCommand, AddressOf DataEdit
AddHandler dgRegistrations.UpdateCommand, AddressOf
DataUpdate
AddHandler dgRegistrations.CancelCommand, AddressOf
DataCancel
AddHandler dgRegistrations.ItemCreated, AddressOf
dg_itemcreated
AddHandler dgRegistrations.SortCommand, AddressOf
subDataSort

If Not Page.IsPostBack Then
If (Request.QueryString("processed") = "true") Then
Page.RegisterClientScriptBlock("csProcessed",
"<script language=javascript>alert('Registrations Processed
Successfully.');</script>")
ElseIf (Request.QueryString("processed") = "false")
Then
Page.RegisterClientScriptBlock("csProcessed",
"<script language=javascript>alert('Threre was and error processing
your registrations.');</script>")
End If

subPopGrid(fncGenerateTable("F"),
Session("strSortEx"))
End If
Catch ex As Exception
Response.Write(ex)
End Try
End Sub

Protected Sub sub_ddlViewSelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Page.RegisterClientScriptBlock("csNotification", "<script
language=javascript>alert('NOTE: This will unselected any selected
registrations.');</script>")
If (ddlView.SelectedValue.ToString = "BOTH") Then
subPopGrid(fncGenerateTable("%"), Session("strSortEx"))
ElseIf (ddlView.SelectedValue.ToString = "UNPROCESSED") Then
subPopGrid(fncGenerateTable("F"), Session("strSortEx"))
ElseIf (ddlView.SelectedValue.ToString = "PROCESSED") Then
subPopGrid(fncGenerateTable("T"), Session("strSortEx"))
Else
End If

End Sub

Private Function fncGenerateTable(ByVal strDisplayProcessed As
String) As DataTable
Dim objOracleCnn As System.Data.OracleClient.OracleConnection
Dim objOracleCom As System.Data.OracleClient.OracleCommand
Dim objOracleAdapter As
System.Data.OracleClient.OracleDataAdapter
Dim dc As DataColumn
Dim dt As New DataTable

Dim utils As New Utilities

strSQL = "SELECT * " & _
"FROM DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"WHERE PROCESSED = '" & strDisplayProcessed & "' " &
_
"ORDER BY DATE_ENTERED, LAST_NAME"

Try
objOracleCnn = New
System.Data.OracleClient.OracleConnection(utils.fn cGetConn(Request.ServerVariables("HTTP_HOST"),
"ORACLE"))
objOracleCom = New
System.Data.OracleClient.OracleCommand(strSQL, objOracleCnn)
objOracleCnn.Open()
objOracleAdapter = New
System.Data.OracleClient.OracleDataAdapter(objOrac leCom)
' fill dt using da
objOracleAdapter.Fill(dt)
' add selected column
dc = New DataColumn
dc.DataType = System.Type.GetType("System.Boolean")
dc.AllowDBNull = True
dc.ColumnName = "SELECTED"
dc.DefaultValue = False

dt.Columns.Add(dc)
' set primary keys
dt.Columns("DATE_ENTERED").Unique = True
dt.Columns("MAIL_ADDR1").Unique = True

Dim objPrimaryKey(2) As DataColumn

objPrimaryKey(0) = dt.Columns("DATE_ENTERED")
objPrimaryKey(1) = dt.Columns("MAIL_ADDR1")
dt.PrimaryKey = objPrimaryKey

' set = session variable for sorting
Session("dt_insurance_type") = dt
fncGenerateTable = dt
Catch ex As Exception
Response.Write(ex)
Exit Function
Finally
' clean up stuff
If (Not objOracleCnn Is Nothing) Then
objOracleCnn.Close()
objOracleCnn.Dispose()
End If

If (Not objOracleCom Is Nothing) Then
objOracleCom.Dispose()
End If

If (Not objOracleAdapter Is Nothing) Then
objOracleAdapter.Dispose()
End If
End Try
End Function

Private Function fncChecksort() As String
If (Session("strSortEx") Is Nothing) Then
Session("strSortEx") = ""
End If
fncChecksort = Session("strSortEx")
End Function

Private Sub subPopGrid(ByVal dt As DataTable, ByVal sort_col As
String)
Try
Dim dv As DataView
dv = New DataView(dt)
dv.Sort = sort_col
With dgRegistrations
.DataSource = dv
.DataBind()
End With
Session("dt") = dt
Catch ex As Exception
Response.Write(ex)
Exit Sub
End Try
End Sub

Protected Sub subDataSort(ByVal Src As Object, ByVal E As
DataGridSortCommandEventArgs)
subPopGrid(Session("dt"), E.SortExpression)
Session("strSortEx") = E.SortExpression
End Sub

Protected Sub sub_btnSubmitClicked(ByVal sender As System.Object,
ByVal e As System.EventArgs)
If Page.IsValid Then
Dim boolAnyProcessed As Boolean = False
Dim dgiSelected As DataGridItem
Dim dt As DataTable = Session("dt")
Dim strDateEntered, strMailingAddr1, strNotes As String
Dim drSelected As DataRow
Dim strUpdateSql As String

Dim objOracleCnn As
System.Data.OracleClient.OracleConnection
Dim objOracleCom As System.Data.OracleClient.OracleCommand
Dim utils As New Utilities

strSQL = "UPDATE DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"SET PROCESSED = 'T', " & _
"PROCESSED_DATE = sysdate, " & _
"PROCESSED_USER = '" &
Session("sLoggedInUser_UID") & "' " & _
"WHERE ('A' = 'A') AND ( "

Try
subUpdateSelected(dt)
objOracleCnn = New
System.Data.OracleClient.OracleConnection(utils.fn cGetConn(Request.ServerVariables("HTTP_HOST"),
"ORACLE"))
objOracleCnn.Open()

For Each drSelected In dt.Rows
Response.Write(drSelected("SELECTED"))

strDateEntered = drSelected("DATE_ENTERED")
strMailingAddr1 = drSelected("MAIL_ADDR1")
strNotes = drSelected("NOTES")

strUpdateSql = "UPDATE
DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"SET NOTES = '" & strNotes & "' " &
_
"WHERE DATE_ENTERED = TO_DATE('" &
strDateEntered & "','MM/DD/YYYY HH12:MI:SS AM') AND " & _
"MAIL_ADDR1 = '" & strMailingAddr1
& "'"

objOracleCom = New
System.Data.OracleClient.OracleCommand(strUpdateSq l, objOracleCnn)
objOracleCom.ExecuteNonQuery()
If (drSelected("SELECTED") = True) Then

boolAnyProcessed = True

strSQL &= "(DATE_ENTERED = TO_DATE('" &
strDateEntered & "','MM/DD/YYYY HH12:MI:SS AM') AND " & _
"MAIL_ADDR1 = '" & strMailingAddr1 &
"') OR"
End If

Next

strSQL = Left(strSQL, strSQL.Length - 2) & ")"
Catch ex As Exception
Response.Write(ex)
Response.End()
Response.Redirect("registration_report.aspx?proces sed=false")
End Try

If (boolAnyProcessed = True) Then
Try

objOracleCom = New
System.Data.OracleClient.OracleCommand(strSQL, objOracleCnn)
objOracleCom.ExecuteNonQuery()
Catch ex As Exception
Response.Write(ex)
Response.End()
Response.Redirect("registration_report.aspx?proces sed=false")
Finally
' clean up stuff
If (Not objOracleCnn Is Nothing) Then
objOracleCnn.Close()
objOracleCnn.Dispose()
End If

If (Not objOracleCom Is Nothing) Then
objOracleCom.Dispose()
End If
End Try

Response.Redirect("registration_report.aspx?proces sed=true")
Else
Response.Redirect("registration_report.aspx?proces sed=false")
End If

End If
End Sub

Sub subUpdateSelected(ByVal dt As DataTable)
Dim dgiSelected As DataGridItem
Dim strDateEntered As String
Dim strMailingAddr1 As String
Dim drSelected As DataRow
Try
' Are any checkboxes checked? Loop and see.
For Each dgiSelected In dgRegistrations.Items
strDateEntered = dgiSelected.Cells(3).Text
strMailingAddr1 = dgiSelected.Cells(11).Text
' Find the datagrid's current row in the datatable by
the primary key value

For Each drSelected In dt.Select("DATE_ENTERED='" &
strDateEntered & "' AND MAIL_ADDR1='" & strMailingAddr1 & "'")
If CType(dgiSelected.FindControl("chkSelect"),
CheckBox).Checked = True Then
'Store True in column SELECTED of datatable
If drSelected Is Nothing Then
'Do Nothing
Else
drSelected.Item("SELECTED") = True
End If
Else
' Store False in column SELECTED of datatable
If drSelected Is Nothing Then
' Do Nothing
Else
drSelected.Item("SELECTED") = False
End If
End If
Next
Next
dt.AcceptChanges()
Session("dt") = dt
Catch ex As Exception
Response.Write(ex)
End Try
End Sub

Sub DataEdit(ByVal Sender As Object, ByVal e As
DataGridCommandEventArgs)
Dim editkey As String
dgRegistrations.EditItemIndex = CInt(e.Item.ItemIndex)
subUpdateSelected(Session("dt"))
subPopGrid(Session("dt"), "") ' Session("strSortEx")
End Sub

Sub DataCancel(ByVal Sender As Object, ByVal E As
DataGridCommandEventArgs)
dgRegistrations.EditItemIndex = -1
Trace.Warn("page.aspx", "edit was cancelled")
subUpdateSelected(Session("dt"))
subPopGrid(Session("dt"), "") ' Session("strSortEx")
End Sub

Public Sub DataUpdate(ByVal source As Object, ByVal e _
As
System.Web.UI.WebControls.DataGridCommandEventArgs )
Dim strDateEntered As String
Dim strMailingAddr1 As String
Dim strNotes As String
Dim txtNotes As TextBox
Dim drSelected As DataRow
Dim dt As DataTable

Try
dt = Session("dt")
subUpdateSelected(Session("dt"))
strDateEntered = e.Item.Cells(3).Text
strMailingAddr1 = e.Item.Cells(11).Text
' Find the datagrid's current row in the datatable by the
primary key value

For Each drSelected In dt.Select("DATE_ENTERED='" &
strDateEntered & "' AND MAIL_ADDR1='" & strMailingAddr1 & "'")
' Store notes changes
strNotes = CType(e.Item.Cells(2).Controls(1),
TextBox).Text
If drSelected Is Nothing Then
' Do Nothing
Else
drSelected.Item("NOTES") = strNotes
End If
Next
' save changes to datatable
dt.AcceptChanges()

Session("dt") = dt
dgRegistrations.EditItemIndex = -1
subUpdateSelected(Session("dt"))
subPopGrid(Session("dt"), "") ' Session("strSortEx")
Catch ex As Exception
Response.Write(ex)
End Try
End Sub

Public Sub dg_itemcreated(ByVal sender As Object, ByVal e As
DataGridItemEventArgs)
Dim itemType As ListItemType = e.Item.ItemType
Dim intItem As Int16

If ((itemType = ListItemType.Pager) Or _
(itemTpe = ListItemType.Header) Or _
(itemType = ListItemType.Footer)) Then
If (itemType = ListItemType.Header) Then
For intItem = 0 To e.Item.Cells.Count - 1
' this makes the title no wrapie!
' note - this will mess up if there is sorting
allowed
e.Item.Cells(intItem).Text = "<nobr>" &
e.Item.Cells(intItem).Text & "</nobr>"
Next
End If
Else
For intItem = 0 To e.Item.Cells.Count - 1
'If (intItem = 0 Or intItem = 1 Or intItem = 2) Then
If (itemType = ListItemType.AlternatingItem) Then
e.Item.Cells(intItem).CssClass = "dgiAlt_noClick"
Else
e.Item.Cells(intItem).CssClass =
"dgiNormal_noClick"
End If
'Else
'e.Item.Cells(intItem).Attributes.Add("onclick",
"fncSelectItem(this)")
'If (itemType = ListItemType.AlternatingItem) Then
'e.Item.Cells(intItem).Text = "<div id='alt_" &
e.Item.ClientID & "_" & intItem & "'>" & e.Item.Cells(intItem).Text &
"</div>"
'e.Item.Cells(intItem).CssClass = "dgiAlt"
'Else
' e.Item.Cells(intItem).Text = "<div id='reg_" &
e.Item.ClientID & "_" & intItem & "'>" & e.Item.Cells(intItem).Text &
"</div>"
' e.Item.Cells(intItem).CssClass = "dgiNormal"
'End If
'End If
Next
End If
End Sub

Public Sub subUpdateTable(ByVal strDateEntered As String, ByVal
strMailingAddr1 As String, ByVal strNotes As String)
Dim objOracleCnn As System.Data.OracleClient.OracleConnection
Dim objOracleCom As System.Data.OracleClient.OracleCommand
Dim objOracleAdapter As
System.Data.OracleClient.OracleDataAdapter

Dim dt As New DataTable

Dim utils As New Utilities

strSQL = "UPDATE DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"SET NOTES = '" & strNotes & "' " & _
"WHERE DATE_ENTERED = TO_DATE('" & strDateEntered &
"','MM/DD/YYYY HH12:MI:SS AM') " & _
"AND MAIL_ADDR1 = '" & strMailingAddr1 & "'"

Try
objOracleCnn = New
System.Data.OracleClient.OracleConnection(utils.fn cGetConn(Request.ServerVariables("HTTP_HOST"),
"ORACLE"))
objOracleCom = New
System.Data.OracleClient.OracleCommand(strSQL, objOracleCnn)
objOracleCnn.Open()
objOracleCom.ExecuteNonQuery()
Catch ex As Exception
Response.Write(ex)
Finally
' clean up stuff
If (Not objOracleCnn Is Nothing) Then
objOracleCnn.Close()
objOracleCnn.Dispose()
End If

If (Not objOracleCom Is Nothing) Then
objOracleCom.Dispose()
End If
End Try
End Sub
End Class
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="registration_report.aspx.vb"
Inherits="events.registration_report" %>
<%@ Register TagPrefix="events" TagName="footer"
Src="/dubois/events/includes/footer.ascx" %>
<%@ Register TagPrefix="events" TagName="side_bar"
Src="/dubois/events/includes/side_bar.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Process Registration</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<style type="text/css">
@import url( ../includes/Styles.css );
</style>
<script language="javascript">
<!--
var m_currSel = new Array();

function fncSelectItem(obj) {
var varDateEntered = "", varAddr1 = "";
alert(obj.id);
varAddr1 = obj.innerHTML.substr(obj.innerHTML.indexOf("8>") + 2);
varAddr1 = varAddr1.substr(0,varAddr1.indexOf("</DIV>"))
varDateEntered = obj.innerHTML.substr(obj.innerHTML.indexOf("0>") +
2,(obj.innerHTML.indexOf("</DIV>")-obj.innerHTML.indexOf("0>") - 2));

if (obj.className == "dgiSelected") {
if (obj.innerHTML.indexOf("alt") > -1) {
obj.className = "dgiAlt";
}
else {
obj.className = "dgiNormal";
}
for (var i=0; i < m_currSel.length; i++) {
if (m_currSel[i] == varDateEntered + "+|+" + varAddr1) {
deleteElement(m_currSel, i);
}
}
}
else {
obj.className = "dgiSelected";

m_currSel[m_currSel.length] = varDateEntered + "+|+" + varAddr1;
}
// +|+ delimits date entered and address
// **|** delimits records
frmProcessRegistration.hdnProcessedValues.value=sh owArray(m_currSel);
}

function showArray(array) {
var arraytext = "";
for (var i=0; i<array.length; i++) {
arraytext += array[i] + "**|**";
}
arraytext = arraytext.substring(0,arraytext.length - 5);
return arraytext;
}
function deleteElement(array,delindex) {
size = array.length;
validNo = (delindex != "NaN");
inRange = ( (delindex >= 0) && (delindex <= array.length) );

if (validNo && inRange) {
for (var i=0; i<=size; i++)
array[i] = ((i == delindex) ? "delete" : array[i]);
for (var j=delindex; j<size-1; j++)
if (j != size) array[j] = array[j+1];
array.length = size-1;
}
}

//-->
</script>
</HEAD>
<body>
<form id="frmProcessRegistration" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td rowspan="4" class="tall"><events:side_bar id="incSideBar"
runat="server"></events:side_bar></td>
<td class="horiz_gr_bar_big"></td>
</tr>
<tr>
<td valign="top"><IMG
SRC="/dubois/events/images/corner_small_top.gif" width="10"
height="8"></td>
</tr>
<tr>
<td valign="top" class="main_body">
<br>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center"><h3>Registration Processing</h3>
</td>
</tr>
<tr>
<td class="indented_body"><h6>To process registrations, select
the appropriate rows and
select the Process Selected button.</h6>
</td>
</tr>
<tr>
<td><asp:Label ID="lblError" Runat="server"
Visible="False"></asp:Label></td>
</tr>
<tr>
<td>
<asp:DataGrid ID="dgRegistrations" Runat="server"
AllowPaging="False" AllowSorting="false" AutoGenerateColumns="false"
GridLines="Horizontal" ShowFooter="false" CellPadding="10"
OnSortCommand="subDataSort" onitemcreated="dg_itemcreated"
OnUpdateCommand="DataUpdate" OnCancelCommand="DataCancel"
OnEditCommand="DataEdit">
<AlternatingItemStyle CssClass="dgiAlt"
VerticalAlign="Top"></AlternatingItemStyle>
<ItemStyle CssClass="dgiNormal"
VerticalAlign="Top"></ItemStyle>
<HeaderStyle Wrap="False"
CssClass="dgiHeader"></HeaderStyle>
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="chkSelect" Runat="server" Checked='<%#
DataBinder.Eval(Container.DataItem, "SELECTED") %>'>
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText="Update" CancelText="Cancel" EditText="Edit">
<ItemStyle Wrap="False"></ItemStyle>
</asp:EditCommandColumn>
<asp:TemplateColumn HeaderText="Notes">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "NOTES") %>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtNotes" TextMode="MultiLine" Rows="4"
Width="250px" Runat="server" text='<%#
DataBinder.Eval(Container.DataItem, "NOTES") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="DATE_ENTERED"
SortExpression="DATE_ENTERED" readonly="true" HeaderText="Date
Entered"></asp:BoundColumn>
<asp:BoundColumn DataField="LAST_NAME"
SortExpression="LAST_NAME" readonly="true" HeaderText="Last
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="FIRST_NAME"
SortExpression="FIRST_NAME" readonly="true" HeaderText="First
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="NAME_TAG"
SortExpression="NAME_TAG" readonly="true" HeaderText="Name
Tag"></asp:BoundColumn>
<asp:BoundColumn DataField="DEPT" SortExpression="DEPT"
readonly="true" HeaderText="Dept"></asp:BoundColumn>
<asp:BoundColumn DataField="EMAIL" SortExpression="EMAIL"
readonly="true" HeaderText="Email"></asp:BoundColumn>
<asp:BoundColumn DataField="DAY_PHONE"
SortExpression="DAY_PHONE" readonly="true"
HeaderText="Phone"></asp:BoundColumn>
<asp:BoundColumn DataField="FAX" SortExpression="FAX"
readonly="true" HeaderText="Fax"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_ADDR1"
SortExpression="MAIL_ADDR1" readonly="true" HeaderText="Mail Addr
1"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_ADDR2"
SortExpression="MAIL_ADDR2" readonly="true" HeaderText="Mail Addr
2"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_STATE"
SortExpression="MAIL_STATE" readonly="true"
HeaderText="State"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_ZIP"
SortExpression="MAIL_ZIP" readonly="true"
HeaderText="Zip"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_COUNTRY"
SortExpression="MAIL_COUNTRY" readonly="true"
HeaderText="Country"></asp:BoundColumn>
<asp:BoundColumn DataField="ATTENDEE_ROLE"
SortExpression="ATTENDEE_ROLE" readonly="true"
HeaderText="Role"></asp:BoundColumn>
<asp:BoundColumn DataField="ROOM_OCCUPANCY_TYPE"
SortExpression="ROOM_OCCUPANCY_TYPE" readonly="true"
HeaderText="Room Type"></asp:BoundColumn>
<asp:BoundColumn DataField="ROOM_DATES"
SortExpression="ROOM_DATES" readonly="true"
HeaderText="Dates"></asp:BoundColumn>
<asp:BoundColumn DataField="SEX" SortExpression="SEX"
readonly="true" HeaderText="Gender"></asp:BoundColumn>
<asp:BoundColumn DataField="ROOMMATE_REQUEST"
SortExpression="ROOMMATE_REQUEST" readonly="true"
HeaderText="Gender"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_OPENING_BANQ"
SortExpression="EVENT_OPENING_BANQ" readonly="true"
HeaderText="Opening Banq"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_CLOSING_BANQ"
SortExpression="EVENT_CLOSING_BANQ" readonly="true"
HeaderText="Closing Banq"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_WUPATKI_DATE"
SortExpression="EVENT_WUPATKI_DATE" readonly="true"
HeaderText="Wupatki"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_RODEN_DATE"
SortExpression="EVENT_RODEN_DATE" readonly="true"
HeaderText="Roden"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_ARCH_TOUR"
SortExpression="EVENT_ARCH_TOUR" readonly="true" HeaderText="Arch
Tour"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_PUEBLO"
SortExpression="EVENT_PUEBLO" readonly="true"
HeaderText="Pueblo"></asp:BoundColumn>
<asp:BoundColumn DataField="PARKING_PASS"
SortExpression="PARKING_PASS" readonly="true" HeaderText="Parking
Pass"></asp:BoundColumn>
<asp:BoundColumn DataField="AMT_DUE"
SortExpression="AMT_DUE" readonly="true" HeaderText="Amount">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_PAYMENT"
SortExpression="MAIL_PAYMENT" readonly="true" HeaderText="Mail
Payment"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_TYPE"
SortExpression="CC_TYPE" readonly="true"
HeaderText="Type"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_NUM" SortExpression="CC_NUM"
readonly="true" HeaderText="#"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_EXP" SortExpression="CC_EXP"
readonly="true" HeaderText="Expiration"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_ATTENDEE_NAME"
SortExpression="CC_ATTENDEE_NAME" readonly="true"
HeaderText="Name"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_ADDR1"
SortExpression="BILLING_ADDR1" readonly="true" HeaderText="Billing
Addr 1"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_ADDR2"
SortExpression="BILLING_ADDR2" readonly="true" HeaderText="Billing
Addr 2"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_STATE"
SortExpression="BILLING_STATE" readonly="true"
HeaderText="State"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_ZIP"
SortExpression="BILLING_ZIP" readonly="true"
HeaderText="Zip"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_COUNTRY"
SortExpression="BILLING_COUNTRY" readonly="true"
HeaderText="Country"></asp:BoundColumn>
</Columns>
</asp:DataGrid>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><asp:DropDownList ID="ddlView" Runat="server"
autopostback="True" OnSelectedIndexChanged="sub_ddlViewSelectedIndexCh anged">
<asp:ListItem Selected="False"
Value="BOTH">Both</asp:ListItem>
<asp:ListItem Selected="True"
Value="UNPROCESSED">Unprocessed</asp:ListItem>
<asp:ListItem Selected="False"
Value="PROCESSED">Processed</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><button id="btnSubmit" name="btnSubmit" class="button"
accesskey="p" onserverclick="sub_btnSubmitClicked" runat="server"
type="button"><u>P</u>rocess Selected</button></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><events:footer id="footer"
runat="server"></events:footer></td>
</tr>
</table>
<input type="hidden" id="hdnProcessedValues"
name="hdnProcessedValues">
</form>
</body>
</HTML>
Nov 18 '05 #1
1 1869
Hi Ryan,

I worked at it for a while, but the code is a bit much to digest and much is
missing such as the user controls.

Could you narrow the code down to a small sample (a few lines) that
demonstrates your problem?

Ken

"Ryan McLean" <Ry*********@NAU.EDU> wrote in message
news:6e**************************@posting.google.c om...
Hi everyone! What is happening is the method: sub_btnSubmitClicked is
being executed every time any other object with a Handler is executed.
I am trying not to use the withevents and handles method of adding
handles to objects (I think that is where my problem lies) . . . sorry
for the long post here is my codebehind and .aspx code. Thank you for
any assistance anyone can offer!

Ryan

Public Class registration_report
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected btnSubmit As HtmlButton
Protected lblError As Label
Protected dgRegistrations As DataGrid
Protected ddlView As DropDownList
Protected chkSelect As CheckBox

Dim strSQL As String

'NOTE: The following placeholder declaration is required by the
Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Try
If (Session.Contents("sLoggedInUser_UID") Is Nothing) Then
Response.Redirect("login.aspx")
End If

AddHandler ddlView.SelectedIndexChanged, AddressOf
sub_ddlViewSelectedIndexChanged
AddHandler btnSubmit.ServerClick, AddressOf
sub_btnSubmitClicked
AddHandler dgRegistrations.EditCommand, AddressOf DataEdit
AddHandler dgRegistrations.UpdateCommand, AddressOf
DataUpdate
AddHandler dgRegistrations.CancelCommand, AddressOf
DataCancel
AddHandler dgRegistrations.ItemCreated, AddressOf
dg_itemcreated
AddHandler dgRegistrations.SortCommand, AddressOf
subDataSort

If Not Page.IsPostBack Then
If (Request.QueryString("processed") = "true") Then
Page.RegisterClientScriptBlock("csProcessed",
"<script language=javascript>alert('Registrations Processed
Successfully.');</script>")
ElseIf (Request.QueryString("processed") = "false")
Then
Page.RegisterClientScriptBlock("csProcessed",
"<script language=javascript>alert('Threre was and error processing
your registrations.');</script>")
End If

subPopGrid(fncGenerateTable("F"),
Session("strSortEx"))
End If
Catch ex As Exception
Response.Write(ex)
End Try
End Sub

Protected Sub sub_ddlViewSelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs)
Page.RegisterClientScriptBlock("csNotification", "<script
language=javascript>alert('NOTE: This will unselected any selected
registrations.');</script>")
If (ddlView.SelectedValue.ToString = "BOTH") Then
subPopGrid(fncGenerateTable("%"), Session("strSortEx"))
ElseIf (ddlView.SelectedValue.ToString = "UNPROCESSED") Then
subPopGrid(fncGenerateTable("F"), Session("strSortEx"))
ElseIf (ddlView.SelectedValue.ToString = "PROCESSED") Then
subPopGrid(fncGenerateTable("T"), Session("strSortEx"))
Else
End If

End Sub

Private Function fncGenerateTable(ByVal strDisplayProcessed As
String) As DataTable
Dim objOracleCnn As System.Data.OracleClient.OracleConnection
Dim objOracleCom As System.Data.OracleClient.OracleCommand
Dim objOracleAdapter As
System.Data.OracleClient.OracleDataAdapter
Dim dc As DataColumn
Dim dt As New DataTable

Dim utils As New Utilities

strSQL = "SELECT * " & _
"FROM DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"WHERE PROCESSED = '" & strDisplayProcessed & "' " &
_
"ORDER BY DATE_ENTERED, LAST_NAME"

Try
objOracleCnn = New
System.Data.OracleClient.OracleConnection(utils.fn cGetConn(Request.ServerVariables("HTTP_HOST"),
"ORACLE"))
objOracleCom = New
System.Data.OracleClient.OracleCommand(strSQL, objOracleCnn)
objOracleCnn.Open()
objOracleAdapter = New
System.Data.OracleClient.OracleDataAdapter(objOrac leCom)
' fill dt using da
objOracleAdapter.Fill(dt)
' add selected column
dc = New DataColumn
dc.DataType = System.Type.GetType("System.Boolean")
dc.AllowDBNull = True
dc.ColumnName = "SELECTED"
dc.DefaultValue = False

dt.Columns.Add(dc)
' set primary keys
dt.Columns("DATE_ENTERED").Unique = True
dt.Columns("MAIL_ADDR1").Unique = True

Dim objPrimaryKey(2) As DataColumn

objPrimaryKey(0) = dt.Columns("DATE_ENTERED")
objPrimaryKey(1) = dt.Columns("MAIL_ADDR1")
dt.PrimaryKey = objPrimaryKey

' set = session variable for sorting
Session("dt_insurance_type") = dt
fncGenerateTable = dt
Catch ex As Exception
Response.Write(ex)
Exit Function
Finally
' clean up stuff
If (Not objOracleCnn Is Nothing) Then
objOracleCnn.Close()
objOracleCnn.Dispose()
End If

If (Not objOracleCom Is Nothing) Then
objOracleCom.Dispose()
End If

If (Not objOracleAdapter Is Nothing) Then
objOracleAdapter.Dispose()
End If
End Try
End Function

Private Function fncChecksort() As String
If (Session("strSortEx") Is Nothing) Then
Session("strSortEx") = ""
End If
fncChecksort = Session("strSortEx")
End Function

Private Sub subPopGrid(ByVal dt As DataTable, ByVal sort_col As
String)
Try
Dim dv As DataView
dv = New DataView(dt)
dv.Sort = sort_col
With dgRegistrations
.DataSource = dv
.DataBind()
End With
Session("dt") = dt
Catch ex As Exception
Response.Write(ex)
Exit Sub
End Try
End Sub

Protected Sub subDataSort(ByVal Src As Object, ByVal E As
DataGridSortCommandEventArgs)
subPopGrid(Session("dt"), E.SortExpression)
Session("strSortEx") = E.SortExpression
End Sub

Protected Sub sub_btnSubmitClicked(ByVal sender As System.Object,
ByVal e As System.EventArgs)
If Page.IsValid Then
Dim boolAnyProcessed As Boolean = False
Dim dgiSelected As DataGridItem
Dim dt As DataTable = Session("dt")
Dim strDateEntered, strMailingAddr1, strNotes As String
Dim drSelected As DataRow
Dim strUpdateSql As String

Dim objOracleCnn As
System.Data.OracleClient.OracleConnection
Dim objOracleCom As System.Data.OracleClient.OracleCommand
Dim utils As New Utilities

strSQL = "UPDATE DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"SET PROCESSED = 'T', " & _
"PROCESSED_DATE = sysdate, " & _
"PROCESSED_USER = '" &
Session("sLoggedInUser_UID") & "' " & _
"WHERE ('A' = 'A') AND ( "

Try
subUpdateSelected(dt)
objOracleCnn = New
System.Data.OracleClient.OracleConnection(utils.fn cGetConn(Request.ServerVariables("HTTP_HOST"),
"ORACLE"))
objOracleCnn.Open()

For Each drSelected In dt.Rows
Response.Write(drSelected("SELECTED"))

strDateEntered = drSelected("DATE_ENTERED")
strMailingAddr1 = drSelected("MAIL_ADDR1")
strNotes = drSelected("NOTES")

strUpdateSql = "UPDATE
DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"SET NOTES = '" & strNotes & "' " &
_
"WHERE DATE_ENTERED = TO_DATE('" &
strDateEntered & "','MM/DD/YYYY HH12:MI:SS AM') AND " & _
"MAIL_ADDR1 = '" & strMailingAddr1
& "'"

objOracleCom = New
System.Data.OracleClient.OracleCommand(strUpdateSq l, objOracleCnn)
objOracleCom.ExecuteNonQuery()
If (drSelected("SELECTED") = True) Then

boolAnyProcessed = True

strSQL &= "(DATE_ENTERED = TO_DATE('" &
strDateEntered & "','MM/DD/YYYY HH12:MI:SS AM') AND " & _
"MAIL_ADDR1 = '" & strMailingAddr1 &
"') OR"
End If

Next

strSQL = Left(strSQL, strSQL.Length - 2) & ")"
Catch ex As Exception
Response.Write(ex)
Response.End()

Response.Redirect("registration_report.aspx?proces sed=false")
End Try

If (boolAnyProcessed = True) Then
Try

objOracleCom = New
System.Data.OracleClient.OracleCommand(strSQL, objOracleCnn)
objOracleCom.ExecuteNonQuery()
Catch ex As Exception
Response.Write(ex)
Response.End()

Response.Redirect("registration_report.aspx?proces sed=false")
Finally
' clean up stuff
If (Not objOracleCnn Is Nothing) Then
objOracleCnn.Close()
objOracleCnn.Dispose()
End If

If (Not objOracleCom Is Nothing) Then
objOracleCom.Dispose()
End If
End Try
Response.Redirect("registration_report.aspx?proces sed=true")
Else

Response.Redirect("registration_report.aspx?proces sed=false")
End If

End If
End Sub

Sub subUpdateSelected(ByVal dt As DataTable)
Dim dgiSelected As DataGridItem
Dim strDateEntered As String
Dim strMailingAddr1 As String
Dim drSelected As DataRow
Try
' Are any checkboxes checked? Loop and see.
For Each dgiSelected In dgRegistrations.Items
strDateEntered = dgiSelected.Cells(3).Text
strMailingAddr1 = dgiSelected.Cells(11).Text
' Find the datagrid's current row in the datatable by
the primary key value

For Each drSelected In dt.Select("DATE_ENTERED='" &
strDateEntered & "' AND MAIL_ADDR1='" & strMailingAddr1 & "'")
If CType(dgiSelected.FindControl("chkSelect"),
CheckBox).Checked = True Then
'Store True in column SELECTED of datatable
If drSelected Is Nothing Then
'Do Nothing
Else
drSelected.Item("SELECTED") = True
End If
Else
' Store False in column SELECTED of datatable
If drSelected Is Nothing Then
' Do Nothing
Else
drSelected.Item("SELECTED") = False
End If
End If
Next
Next
dt.AcceptChanges()
Session("dt") = dt
Catch ex As Exception
Response.Write(ex)
End Try
End Sub

Sub DataEdit(ByVal Sender As Object, ByVal e As
DataGridCommandEventArgs)
Dim editkey As String
dgRegistrations.EditItemIndex = CInt(e.Item.ItemIndex)
subUpdateSelected(Session("dt"))
subPopGrid(Session("dt"), "") ' Session("strSortEx")
End Sub

Sub DataCancel(ByVal Sender As Object, ByVal E As
DataGridCommandEventArgs)
dgRegistrations.EditItemIndex = -1
Trace.Warn("page.aspx", "edit was cancelled")
subUpdateSelected(Session("dt"))
subPopGrid(Session("dt"), "") ' Session("strSortEx")
End Sub

Public Sub DataUpdate(ByVal source As Object, ByVal e _
As
System.Web.UI.WebControls.DataGridCommandEventArgs )
Dim strDateEntered As String
Dim strMailingAddr1 As String
Dim strNotes As String
Dim txtNotes As TextBox
Dim drSelected As DataRow
Dim dt As DataTable

Try
dt = Session("dt")
subUpdateSelected(Session("dt"))
strDateEntered = e.Item.Cells(3).Text
strMailingAddr1 = e.Item.Cells(11).Text
' Find the datagrid's current row in the datatable by the
primary key value

For Each drSelected In dt.Select("DATE_ENTERED='" &
strDateEntered & "' AND MAIL_ADDR1='" & strMailingAddr1 & "'")
' Store notes changes
strNotes = CType(e.Item.Cells(2).Controls(1),
TextBox).Text
If drSelected Is Nothing Then
' Do Nothing
Else
drelected.Item("NOTES") = strNotes
End If
Next
' save changes to datatable
dt.AcceptChanges()

Session("dt") = dt
dgRegistrations.EditItemIndex = -1
subUpdateSelected(Session("dt"))
subPopGrid(Session("dt"), "") ' Session("strSortEx")
Catch ex As Exception
Response.Write(ex)
End Try
End Sub

Public Sub dg_itemcreated(ByVal sender As Object, ByVal e As
DataGridItemEventArgs)
Dim itemType As ListItemType = e.Item.ItemType
Dim intItem As Int16

If ((itemType = ListItemType.Pager) Or _
(itemType = ListItemType.Header) Or _
(itemType = ListItemType.Footer)) Then
If (itemType = ListItemType.Header) Then
For intItem = 0 To e.Item.Cells.Count - 1
' this makes the title no wrapie!
' note - this will mess up if there is sorting
allowed
e.Item.Cells(intItem).Text = "<nobr>" &
e.Item.Cells(intItem).Text & "</nobr>"
Next
End If
Else
For intItem = 0 To e.Item.Cells.Count - 1
'If (intItem = 0 Or intItem = 1 Or intItem = 2) Then
If (itemType = ListItemType.AlternatingItem) Then
e.Item.Cells(intItem).CssClass = "dgiAlt_noClick"
Else
e.Item.Cells(intItem).CssClass =
"dgiNormal_noClick"
End If
'Else
'e.Item.Cells(intItem).Attributes.Add("onclick",
"fncSelectItem(this)")
'If (itemType = ListItemType.AlternatingItem) Then
'e.Item.Cells(intItem).Text = "<div id='alt_" &
e.Item.ClientID & "_" & intItem & "'>" & e.Item.Cells(intItem).Text &
"</div>"
'e.Item.Cells(intItem).CssClass = "dgiAlt"
'Else
' e.Item.Cells(intItem).Text = "<div id='reg_" &
e.Item.ClientID & "_" & intItem & "'>" & e.Item.Cells(intItem).Text &
"</div>"
' e.Item.Cells(intItem).CssClass = "dgiNormal"
'End If
'End If
Next
End If
End Sub

Public Sub subUpdateTable(ByVal strDateEntered As String, ByVal
strMailingAddr1 As String, ByVal strNotes As String)
Dim objOracleCnn As System.Data.OracleClient.OracleConnection
Dim objOracleCom As System.Data.OracleClient.OracleCommand
Dim objOracleAdapter As
System.Data.OracleClient.OracleDataAdapter

Dim dt As New DataTable

Dim utils As New Utilities

strSQL = "UPDATE DUBOIS_ADM.EVENTS_REPORT_TBL " & _
"SET NOTES = '" & strNotes & "' " & _
"WHERE DATE_ENTERED = TO_DATE('" & strDateEntered &
"','MM/DD/YYYY HH12:MI:SS AM') " & _
"AND MAIL_ADDR1 = '" & strMailingAddr1 & "'"

Try
objOracleCnn = New
System.Data.OracleClient.OracleConnection(utils.fn cGetConn(Request.ServerVariables("HTTP_HOST"),
"ORACLE"))
objOracleCom = New
System.Data.OracleClient.OracleCommand(strSQL, objOracleCnn)
objOracleCnn.Open()
objOracleCom.ExecuteNonQuery()
Catch ex As Exception
Response.Write(ex)
Finally
' clean up stuff
If (Not objOracleCnn Is Nothing) Then
objOracleCnn.Close()
objOracleCnn.Dispose()
End If

If (Not objOracleCom Is Nothing) Then
objOracleCom.Dispose()
End If
End Try
End Sub
End Class
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="registration_report.aspx.vb"
Inherits="events.registration_report" %>
<%@ Register TagPrefix="events" TagName="footer"
Src="/dubois/events/includes/footer.ascx" %>
<%@ Register TagPrefix="events" TagName="side_bar"
Src="/dubois/events/includes/side_bar.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>Process Registration</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
<style type="text/css">
@import url( ../includes/Styles.css );
</style>
<script language="javascript">
<!--
var m_currSel = new Array();

function fncSelectItem(obj) {
var varDateEntered = "", varAddr1 = "";
alert(obj.id);
varAddr1 = obj.innerHTML.substr(obj.innerHTML.indexOf("8>") + 2);
varAddr1 = varAddr1.substr(0,varAddr1.indexOf("</DIV>"))
varDateEntered = obj.innerHTML.substr(obj.innerHTML.indexOf("0>") +
2,(obj.innerHTML.indexOf("</DIV>")-obj.innerHTML.indexOf("0>") - 2));

if (obj.className == "dgiSelected") {
if (obj.innerHTML.indexOf("alt") > -1) {
obj.className = "dgiAlt";
}
else {
obj.className = "dgiNormal";
}
for (var i=0; i < m_currSel.length; i++) {
if (m_currSel[i] == varDateEntered + "+|+" + varAddr1) {
deleteElement(m_currSel, i);
}
}
}
else {
obj.className = "dgiSelected";

m_currSel[m_currSel.length] = varDateEntered + "+|+" + varAddr1;
}
// +|+ delimits date entered and address
// **|** delimits records
frmProcessRegistration.hdnProcessedValues.value=sh owArray(m_currSel);
}

function showArray(array) {
var arraytext = "";
for (var i=0; i<array.length; i++) {
arraytext += array[i] + "**|**";
}
arraytext = arraytext.substring(0,arraytext.length - 5);
return arraytext;
}
function deleteElement(array,delindex) {
size = array.length;
validNo = (delindex != "NaN");
inRange = ( (delindex >= 0) && (delindex <= array.length) );

if (validNo && inRange) {
for (var i=0; i<=size; i++)
array[i] = ((i == delindex) ? "delete" : array[i]);
for (var j=delindex; j<size-1; j++)
if (j != size) array[j] = array[j+1];
array.length = size-1;
}
}

//-->
</script>
</HEAD>
<body>
<form id="frmProcessRegistration" method="post" runat="server">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td rowspan="4" class="tall"><events:side_bar id="incSideBar"
runat="server"></events:side_bar></td>
<td class="horiz_gr_bar_big"></td>
</tr>
<tr>
<td valign="top"><IMG
SRC="/dubois/events/images/corner_small_top.gif" width="10"
height="8"></td>
</tr>
<tr>
<td valign="top" class="main_body">
<br>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center"><h3>Registration Processing</h3>
</td>
</tr>
<tr>
<td class="indented_body"><h6>To process registrations, select
the appropriate rows and
select the Process Selected button.</h6>
</td>
</tr>
<tr>
<td><asp:Label ID="lblError" Runat="server"
Visible="False"></asp:Label></td>
</tr>
<tr>
<td>
<asp:DataGrid ID="dgRegistrations" Runat="server"
AllowPaging="False" AllowSorting="false" AutoGenerateColumns="false"
GridLines="Horizontal" ShowFooter="false" CellPadding="10"
OnSortCommand="subDataSort" onitemcreated="dg_itemcreated"
OnUpdateCommand="DataUpdate" OnCancelCommand="DataCancel"
OnEditCommand="DataEdit">
<AlternatingItemStyle CssClass="dgiAlt"
VerticalAlign="Top"></AlternatingItemStyle>
<ItemStyle CssClass="dgiNormal"
VerticalAlign="Top"></ItemStyle>
<HeaderStyle Wrap="False"
CssClass="dgiHeader"></HeaderStyle>
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:CheckBox ID="chkSelect" Runat="server" Checked='<%#
DataBinder.Eval(Container.DataItem, "SELECTED") %>'>
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:EditCommandColumn ButtonType="LinkButton"
UpdateText="Update" CancelText="Cancel" EditText="Edit">
<ItemStyle Wrap="False"></ItemStyle>
</asp:EditCommandColumn>
<asp:TemplateColumn HeaderText="Notes">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "NOTES") %>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtNotes" TextMode="MultiLine" Rows="4"
Width="250px" Runat="server" text='<%#
DataBinder.Eval(Container.DataItem, "NOTES") %>'>
</asp:TextBox>
</EditItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn DataField="DATE_ENTERED"
SortExpression="DATE_ENTERED" readonly="true" HeaderText="Date
Entered"></asp:BoundColumn>
<asp:BoundColumn DataField="LAST_NAME"
SortExpression="LAST_NAME" readonly="true" HeaderText="Last
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="FIRST_NAME"
SortExpression="FIRST_NAME" readonly="true" HeaderText="First
Name"></asp:BoundColumn>
<asp:BoundColumn DataField="NAME_TAG"
SortExpression="NAME_TAG" readonly="true" HeaderText="Name
Tag"></asp:BoundColumn>
<asp:BoundColumn DataField="DEPT" SortExpression="DEPT"
readonly="true" HeaderText="Dept"></asp:BoundColumn>
<asp:BoundColumn DataField="EMAIL" SortExpression="EMAIL"
readonly="true" HeaderText="Email"></asp:BoundColumn>
<asp:BoundColumn DataField="DAY_PHONE"
SortExpression="DAY_PHONE" readonly="true"
HeaderText="Phone"></asp:BoundColumn>
<asp:BoundColumn DataField="FAX" SortExpression="FAX"
readonly="true" HeaderText="Fax"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_ADDR1"
SortExpression="MAIL_ADDR1" readonly="true" HeaderText="Mail Addr
1"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_ADDR2"
SortExpression="MAIL_ADDR2" readonly="true" HeaderText="Mail Addr
2"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_STATE"
SortExpression="MAIL_STATE" readonly="true"
HeaderText="State"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_ZIP"
SortExpression="MAIL_ZIP" readonly="true"
HeaderText="Zip"></asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_COUNTRY"
SortExpression="MAIL_COUNTRY" readonly="true"
HeaderText="Country"></asp:BoundColumn>
<asp:BoundColumn DataField="ATTENDEE_ROLE"
SortExpression="ATTENDEE_ROLE" readonly="true"
HeaderText="Role"></asp:BoundColumn>
<asp:BoundColumn DataField="ROOM_OCCUPANCY_TYPE"
SortExpression="ROOM_OCCUPANCY_TYPE" readonly="true"
HeaderText="Room Type"></asp:BoundColumn>
<asp:BoundColumn DataField="ROOM_DATES"
SortExpression="ROOM_DATES" readonly="true"
HeaderText="Dates"></asp:BoundColumn>
<asp:BoundColumn DataField="SEX" SortExpression="SEX"
readonly="true" HeaderText="Gender"></asp:BoundColumn>
<asp:BoundColumn DataField="ROOMMATE_REQUEST"
SortExpression="ROOMMATE_REQUEST" readonly="true"
HeaderText="Gender"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_OPENING_BANQ"
SortExpression="EVENT_OPENING_BANQ" readonly="true"
HeaderText="Opening Banq"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_CLOSING_BANQ"
SortExpression="EVENT_CLOSING_BANQ" readonly="true"
HeaderText="Closing Banq"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_WUPATKI_DATE"
SortExpression="EVENT_WUPATKI_DATE" readonly="true"
HeaderText="Wupatki"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_RODEN_DATE"
SortExpression="EVENT_RODEN_DATE" readonly="true"
HeaderText="Roden"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_ARCH_TOUR"
SortExpression="EVENT_ARCH_TOUR" readonly="true" HeaderText="Arch
Tour"></asp:BoundColumn>
<asp:BoundColumn DataField="EVENT_PUEBLO"
SortExpression="EVENT_PUEBLO" readonly="true"
HeaderText="Pueblo"></asp:BoundColumn>
<asp:BoundColumn DataField="PARKING_PASS"
SortExpression="PARKING_PASS" readonly="true" HeaderText="Parking
Pass"></asp:BoundColumn>
<asp:BoundColumn DataField="AMT_DUE"
SortExpression="AMT_DUE" readonly="true" HeaderText="Amount">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="MAIL_PAYMENT"
SortExpression="MAIL_PAYMENT" readonly="true" HeaderText="Mail
Payment"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_TYPE"
SortExpression="CC_TYPE" readonly="true"
HeaderText="Type"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_NUM" SortExpression="CC_NUM"
readonly="true" HeaderText="#"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_EXP" SortExpression="CC_EXP"
readonly="true" HeaderText="Expiration"></asp:BoundColumn>
<asp:BoundColumn DataField="CC_ATTENDEE_NAME"
SortExpression="CC_ATTENDEE_NAME" readonly="true"
HeaderText="Name"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_ADDR1"
SortExpression="BILLING_ADDR1" readonly="true" HeaderText="Billing
Addr 1"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_ADDR2"
SortExpression="BILLING_ADDR2" readonly="true" HeaderText="Billing
Addr 2"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_STATE"
SortExpression="BILLING_STATE" readonly="true"
HeaderText="State"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_ZIP"
SortExpression="BILLING_ZIP" readonly="true"
HeaderText="Zip"></asp:BoundColumn>
<asp:BoundColumn DataField="BILLING_COUNTRY"
SortExpression="BILLING_COUNTRY" readonly="true"
HeaderText="Country"></asp:BoundColumn>
</Columns>
</asp:DataGrid>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><asp:DropDownList ID="ddlView" Runat="server"
autopostback="True"
OnSelectedIndexChanged="sub_ddlViewSelectedIndexCh anged">
<asp:ListItem Selected="False"
Value="BOTH">Both</asp:ListItem>
<asp:ListItem Selected="True"
Value="UNPROCESSED">Unprocessed</asp:ListItem>
<asp:ListItem Selected="False"
Value="PROCESSED">Processed</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><button id="btnSubmit" name="btnSubmit" class="button"
accesskey="p" onserverclick="sub_btnSubmitClicked" runat="server"
type="button"><u>P</u>rocess Selected</button></td>
</tr>
</table>
</td>
</tr>
<tr>
<td><events:footer id="footer"
runat="server"></events:footer></td>
</tr>
</table>
<input type="hidden" id="hdnProcessedValues"
name="hdnProcessedValues">
</form>
</body>
</HTML>


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Prescott | last post by:
I want to execute a javascript function that will set a value in the parent window from the child widow where its called and then post the form to the server. I seem to be able to execute one or...
4
by: David Bartosik - MS MVP | last post by:
Can I (and how) run a javascript in the code behind on the server and then send the results of the script to the aspx page. Thereby rendering the content regardless of the clients javascript...
1
by: Tony | last post by:
Hi folks, I've got a bit of a problem. I have a situation where I build forms completely dynamically based on a form definition supplied from a database. Anyway, I noticed that required fields...
5
by: Michelle Stone | last post by:
Hi everybody I am writing a simple asp.net application using form authentication. I store the list of all users and their passwords in an SQL Server database table. My client recently told me...
2
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
1
by: tony | last post by:
Hello!! Hello Victor! I use a product called flygrid to create grid tables. In many of my forms I create such grid tables. Some columns in these grid tables is of type drop down list where I...
6
by: polocar | last post by:
Hi, I'm writing a program in Visual C# 2005 Professional Edition. This program connects to a SQL Server 2005 database called "Generations" (in which there is only one table, called...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.