By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,082 Members | 2,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,082 IT Pros & Developers. It's quick & easy.

ASP.NET page bring someones data upon refresh

P: n/a
Here in my web application, I have a data entry page with serval controls.
Some of the controls have autopostback is set true.
But the problem is when two or more people are entering data at the same
time, in the middle of my data entry , it is brining someelse data on my
screen.
I look everywhere i could not find the solution. Please help me

Radx

Apr 13 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Are you using Session data? Show your code. Odd, there are several posts a
day now that describe odd behavior with session information
"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
Here in my web application, I have a data entry page with serval controls.
Some of the controls have autopostback is set true.
But the problem is when two or more people are entering data at the same
time, in the middle of my data entry , it is brining someelse data on my
screen.
I look everywhere i could not find the solution. Please help me

Radx

Apr 13 '06 #2

P: n/a
Do you need the aspx file or the vb code

"Jeff Dillon" wrote:
Are you using Session data? Show your code. Odd, there are several posts a
day now that describe odd behavior with session information
"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
Here in my web application, I have a data entry page with serval controls.
Some of the controls have autopostback is set true.
But the problem is when two or more people are entering data at the same
time, in the middle of my data entry , it is brining someelse data on my
screen.
I look everywhere i could not find the solution. Please help me

Radx


Apr 13 '06 #3

P: n/a
Here is aspx
<%@ Register TagPrefix="ew" Namespace="eWorld.UI" Assembly="eWorld.UI,
Version=1.9.0.0, Culture=neutral, PublicKeyToken=24d65337282035f2" %>
<%@ Register TagPrefix="ASPNETCommerce" TagName="Header"
Src="_CustomerHeader.ascx" %>
<%@ Page language="vb" AutoEventWireup="false"
Codebehind="SchedulingTestDetail.aspx.vb"
Inherits="DrugFiles.SchedulingTestDetail"%>
<%@ OutputCache Duration="1" VaryByParam="ScheduleDrugTestID" %>
<HTML>
<HEAD>
<LINK href="Styles.css" type="text/css" rel="stylesheet">
<FORM id="Form1" method="post" width="800" runat="server">
</HEAD>
<body bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0"
marginwidth="0" marginheight="0">
<TABLE id="Table2" cellSpacing="0" cellPadding="0" align="left"
bgColor="#d5d4b4" border="0">
<TR>
<TD vAlign="top" noWrap align="left" bgColor="#ffffff" colSpan="1"
rowSpan="1"><ASPNETCOMMERCE:HEADER id="Header1"
runat="server"></ASPNETCOMMERCE:HEADER></TD>
</TR>
<TR>
<TD class="ContentHead" vAlign="middle" align="left" bgColor="white"
colSpan="1" height="4"
rowSpan="1"><asp:label id="ModelName" runat="server" BackColor="White"
Height="8px" DESIGNTIMEDRAGDROP="141">Drug Test Scheduling</asp:label></TD>
</TR>
<TR>
<TD class="ContentHead" vAlign="top" align="left" bgColor="#ffffff"
height="4"></TD>
</TR>
<TR>
<TD class="ContentHead" vAlign="middle" align="left" bgColor="white"
colSpan="1" height="10"
rowSpan="1">
<TABLE id="Table4" borderColor="#f5f5f5" cellSpacing="0"
cellPadding="0" align="left" bgColor="white"
border="0">
<TR>
<TD vAlign="middle" align="left" width="110" height="11"><asp:label
id="Label17" runat="server" BackColor="White" CssClass="Normal"
Width="96px">Schedule Code</asp:label></TD>
<TD vAlign="top" align="left" width="126" height="11"><asp:textbox
id="txtSchCode" runat="server" Height="16px" CssClass="EditTextBox"
Width="208px"
MaxLength="100" ReadOnly="True"></asp:textbox></TD>
<TD vAlign="top" align="left" width="18" bgColor="#ffffff"
height="11"></TD>
<TD vAlign="top" align="left" width="76"
height="11"><asp:requiredfieldvalidator id="Requiredfieldvalidator6"
runat="server" Height="5px" Width="160px" ControlToValidate="cmdSite"
Font-Size="XX-Small" ErrorMessage="Subsidiary Name Left
Blank"></asp:requiredfieldvalidator></TD>
<TD vAlign="top" align="left" width="41" height="11"></TD>
<TD vAlign="top" align="left" bgColor="#ffffff" height="11"></TD>
</TR>
<TR>
<TD vAlign="top" align="left" width="110" colSpan="1" height="11"
rowSpan="1"><asp:label id="Label2" runat="server" BackColor="White"
CssClass="Normal" Width="96px">Account Name</asp:label></TD>
<TD vAlign="top" align="left" width="126"
height="11"><asp:dropdownlist id="cmdCompany" runat="server" Height="16px"
CssClass="CmbEditTextBox" Width="208px"
AutoPostBack="True"></asp:dropdownlist><asp:requiredfieldvalidator
id="Requiredfieldvalidator5" runat="server" Height="5px" Width="208px"
ControlToValidate="cmdCompany"
Font-Size="XX-Small" ErrorMessage="Account Name Left
Blank"></asp:requiredfieldvalidator></TD>
<TD vAlign="top" align="left" width="18" bgColor="white"
height="11"><asp:label id="Label3" runat="server" BackColor="White"
CssClass="Normal" Width="59px"> Subsidiary</asp:label></TD>
<TD vAlign="top" align="left" width="76"
height="11"><asp:dropdownlist id="cmdSite" runat="server" Height="16px"
CssClass="CmbEditTextBox" Width="176px"
AutoPostBack="True"></asp:dropdownlist></TD>
<TD vAlign="top" align="left" width="41" height="11"><asp:label
id="Label4" runat="server" BackColor="White" CssClass="Normal"
Width="56px">Location</asp:label></TD>
<TD vAlign="top" align="left" bgColor="white"
height="11"><asp:dropdownlist id="cmdLocation" runat="server" Height="16px"
CssClass="CmbEditTextBox" Width="240px"
AutoPostBack="True"></asp:dropdownlist></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD class="ContentHead" vAlign="middle" align="left"
bgColor="#ffffff"></TD>
</TR>
<TR>
<TD class="ContentHead" vAlign="middle" align="left" bgColor="white"
colSpan="1" rowSpan="1">
<TABLE id="Table5" borderColor="#d5d4b4" cellSpacing="0"
cellPadding="0" align="left" bgColor="white"
border="0">
<TR>
<TD vAlign="middle" align="left" width="85" height="25"><asp:label
id="Label15" runat="server" BackColor="White" Height="13px" CssClass="Normal"
Width="96px">Applicant Name </asp:label></TD>
<TD align="left" height="25">
<TABLE id="Table1" borderColor="#f5f5f5" height="40" cellSpacing="0"
cellPadding="0" align="left"
bgColor="white" border="0">
<TR>
<TD vAlign="middle" align="left" width="228" colSpan="1"
height="11" rowSpan="1"><asp:label id="Label19" runat="server"
BackColor="White" CssClass="Normal" Width="144px">(Last Name , First
Name)</asp:label><asp:textbox id="txtDonor" runat="server" Height="16px"
CssClass="EditTextBox" Width="242px"
MaxLength="50"></asp:textbox><asp:requiredfieldvalidator
id="Requiredfieldvalidator3" runat="server" Height="5px" Width="152px"
ControlToValidate="txtDonor"
Font-Size="XX-Small" ErrorMessage="Donor's Name Left
Blank"></asp:requiredfieldvalidator></TD>
<TD vAlign="middle" align="left" width="8" height="11"></TD>
<TD vAlign="middle" align="left" width="66" height="11"><asp:label
id="Label16" runat="server" BackColor="White" CssClass="Normal"
Width="32px">SSN</asp:label></TD>
<TD vAlign="middle" align="left" width="18" bgColor="white"
height="11"><asp:textbox id="txtSSN" runat="server" Height="16px"
CssClass="EditTextBox" Width="90px" MaxLength="50"></asp:textbox></TD>
<TD vAlign="middle" align="left" width="18" bgColor="#ffffff"
height="11"><asp:requiredfieldvalidator id="Requiredfieldvalidator2"
runat="server" Height="5px" Width="85px" ControlToValidate="txtSSN"
Font-Size="XX-Small" ErrorMessage="SSN Left
Blank"></asp:requiredfieldvalidator></TD>
<TD vAlign="middle" align="left" width="18" bgColor="#ffffff"
height="11"><asp:regularexpressionvalidator
id="RegularExpressionValidatorSSN" runat="server" Width="176px"
ControlToValidate="txtSSN"
Font-Size="XX-Small" ErrorMessage="RegularExpressionValidator"
Visible="False" Display="Dynamic"></asp:regularexpressionvalidator></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD vAlign="middle" align="left" width="85" height="25"><asp:label
id="Label7" runat="server" BackColor="White" Height="13px"
DESIGNTIMEDRAGDROP="2308"
CssClass="Normal" Width="72px">Home Phone </asp:label></TD>
<TD align="left" height="25">
<TABLE id="Table3" borderColor="#f5f5f5" height="21" cellSpacing="0"
cellPadding="0" align="left"
bgColor="white" border="0">
<TR>
<TD vAlign="middle" align="left" width="104" colSpan="1"
height="11" rowSpan="1"><asp:textbox id="TxtHomePhone" runat="server"
Height="16px" CssClass="EditTextBox" Width="95px"
MaxLength="50"></asp:textbox></TD>
<TD vAlign="top" align="left" width="145"
height="11"><asp:requiredfieldvalidator id="Requiredfieldvalidator1"
runat="server" Height="5px" Width="136px" ControlToValidate="TxtHomePhone"
Font-Size="XX-Small" ErrorMessage="Home Phone Left
Blank"></asp:requiredfieldvalidator><asp:regularexpressionv alidator
id="RegularExpressionValidatorHPh" runat="server" Width="136px"
ControlToValidate="TxtHomePhone"
ErrorMessage="RegularExpressionValidator" Visible="False"
Display="Dynamic"></asp:regularexpressionvalidator></TD>
<TD vAlign="middle" align="left" width="66"><asp:label id="Label6"
runat="server" BackColor="White" CssClass="Normal" Width="64px">Cell
Phone</asp:label></TD>
<TD vAlign="middle" align="left" width="18" bgColor="white"
height="11"><asp:textbox id="txtCellPhone" runat="server" Height="16px"
CssClass="EditTextBox" Width="90px"
MaxLength="50">0</asp:textbox></TD>
</TR>
</TABLE>
<asp:regularexpressionvalidator
id="RegularExpressionValidatorCellPhone" runat="server"
ControlToValidate="txtCellPhone"
ErrorMessage="RegularExpressionValidator" Visible="False"
Display="Dynamic"></asp:regularexpressionvalidator></TD>
</TR>
<TR>
<TD vAlign="middle" align="left" width="85" height="25"><asp:label
id="Label24" runat="server" BackColor="White" Height="13px"
DESIGNTIMEDRAGDROP="2308"
CssClass="Normal" Width="85px">Street Address</asp:label></TD>
<TD align="left" height="25">
<TABLE id="Table11" borderColor="#f5f5f5" height="21"
cellSpacing="0" cellPadding="0" align="left"
bgColor="white" border="0">
<TR>
<TD vAlign="middle" align="left" width="127" colSpan="1"
height="11" rowSpan="1"><asp:textbox id="txtAddress" runat="server"
Height="16px" CssClass="EditTextBox" Width="240px"
MaxLength="50"></asp:textbox></TD>
<TD vAlign="middle" align="left" width="8" height="11"></TD>
<TD vAlign="middle" align="left" width="67" height="11"><asp:label
id="Label25" runat="server" BackColor="White" CssClass="Normal"
Width="16px">City</asp:label></TD>
<TD vAlign="middle" align="left" width="78"><asp:textbox
id="txtCity" runat="server" Height="16px" CssClass="EditTextBox" Width="90px"
MaxLength="100"></asp:textbox></TD>
<TD vAlign="middle" align="left" width="13" bgColor="white"
height="11"></TD>
<TD vAlign="middle" align="left" width="18" bgColor="#ffffff"
height="11"><asp:label id="Label23" runat="server" BackColor="White"
CssClass="Normal" Width="32px">State</asp:label></TD>
<TD vAlign="middle" align="left" width="18" bgColor="#ffffff"
height="11"><asp:dropdownlist id="cmdState" runat="server" Height="16px"
CssClass="CmbEditTextBox" Width="232px"
AutoPostBack="True"></asp:dropdownlist><asp:regularexpressionvalidator
id="Regularexpressionvalidator1" runat="server" Width="176px"
ControlToValidate="cmdState"
Font-Size="XX-Small" ErrorMessage="State Left Blank"
Visible="False" Display="Dynamic"></asp:regularexpressionvalidator></TD>
</TR>
</TABLE>
<asp:label id="lblState" runat="server" BackColor="White"
CssClass="Normal" Width="120px" ForeColor="Red"></asp:label></TD>
</TR>
<TR>
<TD vAlign="middle" align="left" height="25"><asp:label id="Label20"
runat="server" BackColor="White" Height="13px" CssClass="Normal"
Width="52px"> Zip Code</asp:label></TD>
<TD vAlign="middle" align="left" height="25">
<TABLE id="Table10" borderColor="#f5f5f5" height="23"
cellSpacing="0" cellPadding="0" align="left"
bgColor="white" border="0">
<TR>
<TD vAlign="middle" align="left" width="104" colSpan="1"
height="11" rowSpan="1"><asp:textbox id="txtDonorZipCode" runat="server"
Height="16px" CssClass="EditTextBox" Width="95px"
MaxLength="50"></asp:textbox></TD>
<TD vAlign="middle" align="left" width="137"
height="11"><asp:button id="btnSearchCS" runat="server" BackColor="Gainsboro"
Height="20px" CssClass="Button"
Width="128px" Font-Size="XX-Small" Text="Search Collection Site"
BorderColor="WhiteSmoke" ForeColor="Black" Font-Names="Arial"
Font-Bold="True"></asp:button></TD>
<TD vAlign="middle" align="left" width="139"
height="11"><asp:requiredfieldvalidator id="Requiredfieldvalidator4"
runat="server" Height="5px" Width="152px" ControlToValidate="txtDonorZipCode"
Font-Size="XX-Small" ErrorMessage="Donor Zip Code Left
Blank"></asp:requiredfieldvalidator><asp:label id="lblZipError"
runat="server" BackColor="White" CssClass="Normal" Width="344px"
ForeColor="Red"></asp:label></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD align="left"></TD>
<TD vAlign="top" align="left"><asp:panel id="PnlCollectionMatch"
runat="server" BackColor="White" Width="368px" Visible="False">
<TABLE id="Table6" borderColor="#f5f5f5" height="26"
cellSpacing="0" cellPadding="0" align="left"
bgColor="white" border="0">
<TR>
<TD vAlign="middle" align="left" width="365">
<asp:label id="Label10" runat="server" BackColor="White"
Height="13px" CssClass="Normal" Width="96px">Near By Site(s)</asp:label></TD>
<TD vAlign="middle" align="left" width="365" colSpan="1"
rowSpan="1">
<asp:dropdownlist id="cmdCollectionSite" runat="server"
CssClass="CmbEditTextBox" Width="352px"
AutoPostBack="True"></asp:dropdownlist></TD>
</TR>
<TR>
<TD vAlign="middle" align="left"></TD>
<TD vAlign="middle" align="left" colSpan="2">
<asp:TextBox id="txtCollectionDetails" runat="server"
Height="70px" CssClass="EditTextBox" Width="352px"
MaxLength="2500" ReadOnly="True" TextMode="MultiLine"
Enabled="False"></asp:TextBox></TD>
<TD vAlign="top" align="left">
<asp:label id="Label21" runat="server" BackColor="White"
CssClass="Normal" Width="296px">*Approximate distance in miles from donor's
site to the collection site.</asp:label></TD>
</TR>
</TABLE>
</asp:panel></TD>
</TR>
<TR>
<TD align="left" width="85"><asp:label id="Label22" runat="server"
BackColor="White" Height="13px" CssClass="Normal" Width="104px">Selected
Collection Site</asp:label></TD>
<TD vAlign="top" align="left"><asp:textbox id="txtCollection"
runat="server" Height="90px" CssClass="EditTextBox" Width="376px"
MaxLength="2500" ReadOnly="True" TextMode="MultiLine"
Enabled="False"></asp:textbox><asp:label id="lblCollectionSiteID"
runat="server" Width="112px" Visible="False">Label</asp:label></TD>
</TR>
<TR>
<TD vAlign="middle" align="left"><asp:label id="Label26"
runat="server" BackColor="White" Height="13px" CssClass="Normal"
Width="64px">Service(s)</asp:label></TD>
<TD vAlign="middle" align="left"><asp:radiobuttonlist id="rbnService"
runat="server" Width="450px" CellSpacing="0" RepeatDirection="Horizontal"
CellPadding="0">
<asp:ListItem Value="1">Urine Drug Collection(UDC)</asp:ListItem>
<asp:ListItem Value="2">Breath Alcohol Test (BAT)</asp:ListItem>
<asp:ListItem Value="3">Both</asp:ListItem>
</asp:radiobuttonlist></TD>
</TR>
<TR>
<TD align="left" colSpan="2">
<TABLE id="Table12" borderColor="#f5f5f5" cellSpacing="0"
cellPadding="0" align="left"
bgColor="white" border="0">
<TR>
<TD vAlign="middle" align="left" width="103"
height="11"><asp:label id="Label1" runat="server" BackColor="White"
CssClass="Normal" Width="94px">Reason For Test</asp:label></TD>
<TD vAlign="middle" align="left" colSpan="1" height="11"
rowSpan="1"><asp:dropdownlist id="cmdReason" runat="server"
CssClass="CmbEditTextBox" Width="208px"></asp:dropdownlist></TD>
<TD vAlign="middle" align="left" width="15" height="11"></TD>
<TD vAlign="middle" align="left" width="97" height="11">
<asp:label id="Label8" runat="server" BackColor="White"
CssClass="Normal" Width="158px">Date Of Job Offer Accepted</asp:label></TD>
<TD vAlign="middle" align="left" height="11"><ew:calendarpopup
id="dtaccepted" tabIndex="29" runat="server" Height="16px" Width="64px"
Text=".."
BorderColor="Gray" CellPadding="0px" VisibleDate="2004-05-05"
SelectedDate="2004-05-06" CalendarWidth="0" DisableTextboxEntry="False"
NullableLabelText=" "
BorderStyle="Solid" BorderWidth="0px" GoToTodayText=" "
DisplayPrevNextYearSelection="True" EnableHideDropDown="True">
<TextboxLabelStyle CssClass="EditTextBox"></TextboxLabelStyle>
<WeekdayStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="White"></WeekdayStyle>
<MonthHeaderStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#D0D4C2"></MonthHeaderStyle>
<OffMonthStyle BackColor="White"></OffMonthStyle>
<GoToTodayStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="White"></GoToTodayStyle>
<TodayDayStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"></TodayDayStyle>
<DayHeaderStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#E5EBDF"></DayHeaderStyle>
<WeekendStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#C0C0FF"></WeekendStyle>
<SelectedDateStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#D0D4C2"></SelectedDateStyle>
<ClearDateStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="White"></ClearDateStyle>
<HolidayStyle BackColor="White"></HolidayStyle>
</ew:calendarpopup></TD>
<TD vAlign="middle" align="left" height="11"><ew:timepicker
id="tpAccepted" runat="server" Height="16px" CssClass="EditTextBox"
Width="64px"
Visible="False" BorderColor="Gray" CellPadding="0px"
BorderStyle="Solid" BorderWidth="0px" MinuteInterval="TenMinutes"
PopupHeight="150px"
PopupWidth="136px" NumberOfColumns="2"
DisplayUnselectableTimes="True" LowerBoundTime="12:00 AM"
UpperBoundTime="11:59 PM" ImageUrl="images/cal.gif">
<TextboxLabelStyle CssClass="EditTextBox"></TextboxLabelStyle>
<ClearTimeStyle BackColor="White"></ClearTimeStyle>
<TimeStyle ForeColor="AliceBlue"
BackColor="LightSteelBlue"></TimeStyle>
<SelectedTimeStyle ForeColor="AliceBlue"
BackColor="Navy"></SelectedTimeStyle>
</ew:timepicker></TD>
</TR>
<TR>
<TD vAlign="middle" align="left" width="103" height="11"></TD>
<TD vAlign="middle" align="left" height="11">
<asp:requiredfieldvalidator id="Requiredfieldvalidator8"
runat="server" Height="5px" Width="152px" ControlToValidate="cmdReason"
Font-Size="XX-Small" ErrorMessage="Reason For Test Left
Blank"></asp:requiredfieldvalidator></TD>
<TD vAlign="middle" align="left" width="15" height="11"></TD>
<TD vAlign="middle" align="left" width="97" height="11"></TD>
<TD vAlign="middle" align="left" height="11"></TD>
<TD vAlign="middle" align="left" height="11"></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD vAlign="top" align="left" colSpan="2">
<TABLE id="Table7" borderColor="#f5f5f5" cellSpacing="0"
cellPadding="0" align="left" bgColor="white"
border="0">
<TR>
<TD vAlign="middle" align="left" colSpan="1" height="13"
rowSpan="1"><asp:label id="Label9" runat="server" BackColor="White"
CssClass="Normal" Width="208px">Did Donor call within allotted time
?</asp:label><asp:dropdownlist id="cmdAllottedTime" runat="server"
Height="16px" CssClass="CmbEditTextBox" Width="88px"
AutoPostBack="True">
<asp:ListItem Value="1">Yes</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
</asp:dropdownlist></TD>
</TR>
<TR>
<TD vAlign="top" align="left" colSpan="5"><asp:panel
id="pnlApproval" runat="server" Visible="False">
<TABLE id="Table8" borderColor="#f5f5f5" cellSpacing="0"
cellPadding="0" align="left" bgColor="white"
border="0">
<TR>
<TD vAlign="middle" align="left" width="114" colSpan="1"
height="19" rowSpan="1">
<asp:label id="Label12" runat="server" BackColor="White"
CssClass="Normal" Width="120px">Exception Approved?</asp:label></TD>
<TD vAlign="top" align="left" width="75" height="19">
<asp:dropdownlist id="cmdExecptionApproved" runat="server"
Height="16px" CssClass="CmbEditTextBox"
Width="88px" AutoPostBack="True">
<asp:ListItem Value="1">Yes</asp:ListItem>
<asp:ListItem Value="0">No</asp:ListItem>
<asp:ListItem Value="-1" Selected="True">N/A</asp:ListItem>
</asp:dropdownlist></TD>
<TD vAlign="middle" align="left" width="18" bgColor="#ffffff"
height="19">
<asp:label id="Label13" runat="server" BackColor="White"
CssClass="Normal" Width="80px">Approved By?</asp:label></TD>
<TD vAlign="middle" align="left" bgColor="white" height="19">
<asp:textbox id="txtapproved" runat="server" Height="16px"
CssClass="EditTextBox" Width="262px"
MaxLength="50"></asp:textbox></TD>
</TR>
<TR>
<TD vAlign="middle" align="left">
<asp:label id="Label14" runat="server" BackColor="White"
CssClass="Normal" Width="32px">Notes</asp:label></TD>
<TD vAlign="top" align="left" colSpan="4">
<asp:textbox id="txtApprovalnotes" runat="server"
Height="60px" CssClass="EditTextBox" Width="440px"
MaxLength="2500" TextMode="MultiLine"></asp:textbox></TD>
</TR>
</TABLE>
</asp:panel></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD vAlign="middle" align="left" width="85" height="24"><asp:label
id="Label11" runat="server" BackColor="White" CssClass="Normal"
Width="105px"> Scheduled Date</asp:label></TD>
<TD vAlign="middle" align="left">
<TABLE id="Table13" borderColor="#f5f5f5" cellSpacing="0"
cellPadding="0" align="left"
bgColor="white" border="0">
<TR>
<TD vAlign="middle" align="left" height="11"><ew:calendarpopup
id="dtDFSchdate" tabIndex="29" runat="server" Height="16px" Width="72px"
Text=".."
BorderColor="Gray" CellPadding="0px" VisibleDate="2004-05-05"
SelectedDate="2006-05-01" CalendarWidth="0" DisableTextboxEntry="False"
NullableLabelText=" "
BorderStyle="Solid" BorderWidth="0px" GoToTodayText=" "
DisplayPrevNextYearSelection="True">
<TextboxLabelStyle CssClass="EditTextBox"></TextboxLabelStyle>
<WeekdayStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="White"></WeekdayStyle>
<MonthHeaderStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#D0D4C2"></MonthHeaderStyle>
<OffMonthStyle BackColor="White"></OffMonthStyle>
<GoToTodayStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="White"></GoToTodayStyle>
<TodayDayStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"></TodayDayStyle>
<DayHeaderStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#E5EBDF"></DayHeaderStyle>
<WeekendStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#C0C0FF"></WeekendStyle>
<SelectedDateStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="#D0D4C2"></SelectedDateStyle>
<ClearDateStyle Font-Size="XX-Small"
Font-Names="Verdana,Helvetica,Tahoma,Arial" ForeColor="Black"
BackColor="White"></ClearDateStyle>
<HolidayStyle BackColor="White"></HolidayStyle>
</ew:calendarpopup></TD>
<TD vAlign="middle" align="left" width="32" colSpan="1"
height="11" rowSpan="1"></TD>
<TD vAlign="middle" align="left" width="100"
height="11"><asp:label id="Label18" runat="server" BackColor="White"
CssClass="Normal" Width="96px">Collection Date:</asp:label></TD>
<TD vAlign="middle" align="left" height="11"><asp:textbox
id="txtSpecimenCollection" runat="server" Height="16px"
CssClass="EditTextBox" Width="192px"
MaxLength="100" ReadOnly="True"></asp:textbox></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD vAlign="middle" align="left" width="85"><asp:label id="Label5"
runat="server" BackColor="White" CssClass="Normal"
Width="48px">Remarks</asp:label></TD>
<TD vAlign="top" align="left" bgColor="white" colSpan="1"
rowSpan="1"><asp:textbox id="txtRemark" runat="server" Height="56px"
CssClass="EditTextBox" Width="728px"
MaxLength="2500" TextMode="MultiLine"></asp:textbox></TD>
</TR>
<TR>
<TD vAlign="middle" align="left" width="85" height="8"></TD>
<TD vAlign="middle" align="left" bgColor="#ffffff" height="8"></TD>
</TR>
<TR>
<TD vAlign="middle" align="left" width="85" height="31"></TD>
<TD vAlign="middle" align="left" bgColor="#ffffff" colSpan="1"
height="31" rowSpan="1"><asp:button id="btnSave" runat="server"
BackColor="Gainsboro" Height="20px" CssClass="Button"
Width="50px" Font-Size="XX-Small" Text="Save"
BorderColor="WhiteSmoke" ForeColor="Black" Font-Names="Arial"
Font-Bold="True"></asp:button><asp:imagebutton id="ImageButton2"
runat="server" Height="4px" Width="96px"></asp:imagebutton>
<asp:button id="btnback" runat="server" BackColor="Gainsboro"
Height="20px" CssClass="Button"
Width="50px" Font-Size="XX-Small" Text="Back"
BorderColor="WhiteSmoke" ForeColor="Black"
Font-Names="Arial" Font-Bold="True"></asp:button>
<asp:imagebutton id="Imagebutton1" runat="server" Height="4px"
Width="96px"></asp:imagebutton><asp:button id="btnNew" runat="server"
BackColor="Gainsboro" Height="20px" CssClass="Button"
Width="50px" Font-Size="XX-Small" Text="New"
BorderColor="WhiteSmoke" ForeColor="Black" Font-Names="Arial"
Font-Bold="True"></asp:button></TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>
</body>
</HTML>
"Jeff Dillon" wrote:
Are you using Session data? Show your code. Odd, there are several posts a
day now that describe odd behavior with session information
"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
Here in my web application, I have a data entry page with serval controls.
Some of the controls have autopostback is set true.
But the problem is when two or more people are entering data at the same
time, in the middle of my data entry , it is brining someelse data on my
screen.
I look everywhere i could not find the solution. Please help me

Radx


Apr 13 '06 #4

P: n/a
Imports System.Data.SqlClient
Public Class SchedulingTestDetail
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
'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
'************************************************* ******
' Page_Load function
' This function is called when the page is loaded
'************************************************* ******
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim _strSeperator As String =
System.Globalization.NumberFormatInfo.CurrentInfo. NumberDecimalSeparator
RegisterClientScriptBlock("FilterNumeric", GetNumberValidatorScript())
txtSSN.Attributes.Add("onkeypress", "FilterNumeric()")
RegularExpressionValidatorSSN.ControlToValidate = txtSSN.ID
RegularExpressionValidatorSSN.ValidationExpression =
"(^[-]?[1-9]\d+$)|(^[-]?[1-9]$)|(^0$)|(^[-]?[1-9]\d+\" + _strSeperator +
"\d$)|(^[-]?[0-9]\" + _strSeperator + "\d$)"
RegularExpressionValidatorSSN.ErrorMessage = "SSN isn't valid!"
RegularExpressionValidatorSSN.ToolTip = "NNNNN.N"
RegularExpressionValidatorSSN.EnableViewState = False
RegularExpressionValidatorSSN.Visible = True
TxtHomePhone.Attributes.Add("onkeypress", "FilterNumeric()")
RegularExpressionValidatorHPh.ControlToValidate = TxtHomePhone.ID
RegularExpressionValidatorHPh.ValidationExpression =
"(^[-]?[1-9]\d+$)|(^[-]?[1-9]$)|(^0$)|(^[-]?[1-9]\d+\" + _strSeperator +
"\d$)|(^[-]?[0-9]\" + _strSeperator + "\d$)"
RegularExpressionValidatorHPh.ErrorMessage = "Home Phone isn't valid!"
RegularExpressionValidatorHPh.ToolTip = "NNNNN.N"
RegularExpressionValidatorHPh.EnableViewState = False
RegularExpressionValidatorHPh.Visible = True
txtCellPhone.Attributes.Add("onkeypress", "FilterNumeric()")
RegularExpressionValidatorCellPhone.ControlToValid ate =
txtCellPhone.ID
RegularExpressionValidatorCellPhone.ValidationExpr ession =
"(^[-]?[1-9]\d+$)|(^[-]?[1-9]$)|(^0$)|(^[-]?[1-9]\d+\" + _strSeperator +
"\d$)|(^[-]?[0-9]\" + _strSeperator + "\d$)"
RegularExpressionValidatorCellPhone.ErrorMessage = "Cell Phone isn't
valid!"
RegularExpressionValidatorCellPhone.ToolTip = "NNNNN.N"
RegularExpressionValidatorCellPhone.EnableViewStat e = False
RegularExpressionValidatorCellPhone.Visible = True
Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout *
60) + 5) & ";URL=Login.aspx")
If Not IsPostBack Then
Dim AppID As Decimal = 0
Dim index As Integer = 0
Dim bColSite As Boolean = False
Dim icomp As Long = 0
Dim isite As Long = 0
Dim iloc As Long = 0
'Controls.Add(BuildNumberValidator(txtSSN.ID, "Number isn't
valid!!!"))
Dim myCollectionSiteDR As SqlDataReader
Dim ScheduleDrugTestID As Decimal = 0
AppID = CDec(Session("SSDrugFileUser_ID"))
ScheduleDrugTestID = CDec(Request.Params("ScheduleDrugTestID"))
lblZipError.Text = ""
'tpaccepted.Width = System.Web.UI.WebControls.UnitConverter
Dim AppProfileInfo As DrugFiles.Components.AppUserProfileDB =
New DrugFiles.Components.AppUserProfileDB
Dim labInfo As DrugFiles.Components.InstantTestDetailDb = New
DrugFiles.Components.InstantTestDetailDb
'Loading lab information based on the Location selection
cmdReason.DataSource = labInfo.GetSpecimenReasonList()
cmdReason.DataTextField = "Descr"
cmdReason.DataValueField = "ReasonCode"
cmdReason.DataBind()
cmdReason.Items.Insert(0, "")
cmdReason.Items(0).Selected = True
' Loading Company Information based on the User Id
cmdCompany.DataSource =
AppProfileInfo.GetCompanyNamesForUser(AppID)
cmdCompany.DataTextField = "CompanyName"
cmdCompany.DataValueField = "CompanyID"
cmdCompany.DataBind()
cmdCompany.Items.Insert(0, "")
cmdCompany.Items(0).Selected = True
With cmdState
.DataSource = labInfo.GetStateCode()
.DataTextField = "StateName"
.DataValueField = "StateAbbr"
.DataBind()
.Items.Insert(0, "")
.Items(0).Value = ""
End With
If ScheduleDrugTestID > 0 Then
Dim mySpecimen As DrugFiles.Components.ScheduleDetail = New
DrugFiles.Components.ScheduleDetail
mySpecimen = labInfo.GetScheduleTestDetail(ScheduleDrugTestID)
lblZipError.Text = ""
For index = 0 To cmdState.Items.Count - 1
If cmdState.Items(index).Value =
CStr(mySpecimen.Statecode) Then
cmdState.SelectedIndex = index
index = cmdState.Items.Count
End If
Next index
For index = 0 To cmdCompany.Items.Count - 1
If cmdCompany.Items(index).Value =
CStr(mySpecimen.CompanyID) Then
cmdCompany.SelectedIndex = index
index = cmdCompany.Items.Count
End If
Next index
' Loading the Site Information based on the User Id and
Company id
cmdSite.DataSource =
AppProfileInfo.GetSiteNamesForUser(AppID, cmdCompany.SelectedValue)
cmdSite.DataTextField = "SiteName"
cmdSite.DataValueField = "SiteID"
cmdSite.DataBind()
For index = 0 To cmdSite.Items.Count - 1
If cmdSite.Items(index).Value = CStr(mySpecimen.SiteID)
Then
cmdSite.SelectedIndex = index
index = cmdSite.Items.Count
End If
Next index
' Loading the Location information based on user id ,
Company id , Site id
cmdLocation.DataSource =
AppProfileInfo.GetLocationNamesForUser(AppID, cmdCompany.SelectedValue,
cmdSite.SelectedValue)
cmdLocation.DataTextField = "LocationName"
cmdLocation.DataValueField = "LocationID"
cmdLocation.DataBind()
cmdLocation.Items.Insert(0, "")
cmdLocation.Items(0).Selected = True
For index = 0 To cmdLocation.Items.Count - 1
If cmdLocation.Items(index).Value =
CStr(mySpecimen.LocationID) Then
cmdLocation.SelectedIndex = index
index = cmdLocation.Items.Count
End If
Next index
If mySpecimen.SchService = 1 Then
rbnService.Items(0).Selected = True
rbnService.Items(1).Selected = False
rbnService.Items(2).Selected = False
ElseIf mySpecimen.SchService = 2 Then
rbnService.Items(0).Selected = False
rbnService.Items(1).Selected = True
rbnService.Items(2).Selected = False
ElseIf mySpecimen.SchService = 3 Then
rbnService.Items(0).Selected = False
rbnService.Items(1).Selected = False
rbnService.Items(2).Selected = True
ElseIf mySpecimen.SchService <= 0 And mySpecimen.SchService
3 Then

rbnService.Items(0).Selected = False
rbnService.Items(1).Selected = False
rbnService.Items(2).Selected = False
End If
lblCollectionSiteID.Text = mySpecimen.CollectionSiteID
txtCollection.Text =
labInfo.GetCollectionSitesAddress(mySpecimen.Colle ctionSiteID)
' Reason
For index = 0 To cmdReason.Items.Count - 1
If cmdReason.Items(index).Value =
CStr(mySpecimen.ReasonCode) Then
cmdReason.SelectedIndex = index
index = cmdReason.Items.Count
End If
Next index
For index = 0 To cmdAllottedTime.Items.Count - 1
If cmdAllottedTime.Items(index).Value =
CStr(mySpecimen.IscalledinTime) Then
cmdAllottedTime.SelectedIndex = index
index = cmdAllottedTime.Items.Count
End If
Next
For index = 0 To cmdExecptionApproved.Items.Count - 1
If cmdExecptionApproved.Items(index).Value =
CStr(mySpecimen.ExceptionApproved) Then
cmdExecptionApproved.SelectedIndex = index
index = cmdExecptionApproved.Items.Count
End If
Next
If cmdAllottedTime.SelectedValue = "1" Then
pnlApproval.Visible = False
Else
pnlApproval.Visible = True
End If
txtapproved.Text = mySpecimen.ApprovedBy
txtApprovalnotes.Text = mySpecimen.ApprovalNotes
txtDonor.Text = mySpecimen.DonorName
txtRemark.Text = mySpecimen.RemarkNotes
txtSSN.Text = mySpecimen.SSN
txtCellPhone.Text = mySpecimen.HomeCell
TxtHomePhone.Text = mySpecimen.HomePhone
txtSchCode.Text = mySpecimen.ScheduleDrugTestCode
txtAddress.Text = mySpecimen.AddressLine
txtCity.Text = mySpecimen.City
For index = 0 To cmdState.Items.Count - 1
If cmdState.Items(index).Value =
CStr(mySpecimen.Statecode) Then
cmdState.SelectedIndex = index
index = cmdState.Items.Count
End If
Next
txtDonorZipCode.Text = mySpecimen.ZipCode
dtaccepted.SelectedDate =
CType(mySpecimen.AcceptedOfferDate, Date)
dtaccepted.VisibleDate = CType(mySpecimen.AcceptedOfferDate,
Date)
' tpAccepted.SelectedTime =
CType(mySpecimen.AcceptedOfferDate, Date)
dtDFSchdate.SelectedDate = CType(mySpecimen.DonorSchDate,
Date)
dtDFSchdate.VisibleDate = CType(mySpecimen.DonorSchDate, Date)
If mySpecimen.SpecimenCollectedDate <> "" Then
txtSpecimenCollection.Text =
mySpecimen.SpecimenCollectedDate
Else
txtSpecimenCollection.Text = "Result not yet arrived"
End If
Else
lblCollectionSiteID.Text = "0"
rbnService.Items(0).Selected = True
dtDFSchdate.SelectedDate = Now
dtaccepted.SelectedDate = Now
End If
labInfo = Nothing
End If
End Sub
Private Function GetNumberValidatorScript() As String
Dim _str As String
_str = "<script> "
_str += " function FilterNumeric(){"
_str += " var re; "
_str += "var ch=String.fromCharCode(event.keyCode);"
_str += "if (event.keyCode<32)"
_str += "{"
_str += "return;"
_str += "};"

_str += "if( (event.keyCode<=57)&&(event.keyCode>=48))"
_str += "{"
_str += "if (!event.shiftKey)"
_str += "{"
_str += "return;"
_str += "}"
_str += "}"
_str+="if ((ch=='-') ||(ch=='.'))"
_str += "{"
_str += "return;"
_str += "}"
_str += "event.returnValue=false;"
_str += "}</script>"
Return _str
End Function
Private Sub cmdCompany_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdCompany.SelectedIndexChanged
Dim AppID As Decimal = 0
Dim isiteid As Decimal = 0
Dim icomp As Decimal = 0
Dim ilocid As Decimal = 0
Dim iCollection As Long = 0
Dim index As Integer
Dim labInfo As DrugFiles.Components.InstantTestDetailDb = New
DrugFiles.Components.InstantTestDetailDb
'AppID = CDec(Request.Params("AppUserID"))
AppID = CDec(Request.Cookies("DrugFileUser_ID").Value())
'Loading site information based on the company selection
Dim AppProfileInfo As DrugFiles.Components.AppUserProfileDB = New
DrugFiles.Components.AppUserProfileDB
If cmdCompany.SelectedValue = Nothing Then
icomp = 0
Else
icomp = cmdCompany.SelectedValue
End If
cmdSite.DataSource = AppProfileInfo.GetSiteNamesForUser(AppID, icomp)
cmdSite.DataTextField = "SiteName"
cmdSite.DataValueField = "SiteID"
cmdSite.DataBind()
If (cmdSite.SelectedValue = Nothing) Then
isiteid = 0
Else
isiteid = cmdSite.SelectedValue
End If
cmdLocation.DataSource =
AppProfileInfo.GetLocationNamesForUser(AppID, icomp, isiteid)
cmdLocation.DataTextField = "LocationName"
cmdLocation.DataValueField = "LocationID"
cmdLocation.DataBind()
cmdLocation.Items.Insert(0, "")
cmdLocation.Items(0).Selected = True
If (cmdLocation.SelectedValue = Nothing) Then
ilocid = 0 Else ilocid =
cmdLocation.SelectedValue End If
lblCollectionSiteID.Text = "0"
PnlCollectionMatch.Visible = False
End Sub
Private Sub cmdSite_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cmdSite.SelectedIndexChanged
Dim AppID As Decimal = 0
Dim isiteid As Decimal = 0
Dim ilocid As Decimal = 0
Dim labInfo As DrugFiles.Components.InstantTestDetailDb = New
DrugFiles.Components.InstantTestDetailDb
AppID = CDec(Request.Cookies("DrugFileUser_ID").Value())
'Loading location based on the site selection
Dim AppProfileInfo As DrugFiles.Components.AppUserProfileDB = New
DrugFiles.Components.AppUserProfileDB
If cmdSite.SelectedValue = Nothing Then isiteid = 0
Else isiteid = cmdSite.SelectedValue End If
cmdLocation.DataSource =
AppProfileInfo.GetLocationNamesForUser(AppID, cmdCompany.SelectedValue,
isiteid)
cmdLocation.DataTextField = "LocationName"
cmdLocation.DataValueField = "LocationID"
cmdLocation.DataBind()
cmdLocation.Items.Insert(0, "")
cmdLocation.Items(0).Selected = True
If (cmdLocation.SelectedValue = Nothing) Then
ilocid = 0 Else ilocid =
cmdLocation.SelectedValue End If
lblCollectionSiteID.Text = "0" PnlCollectionMatch.Visible =
False
ess.Visible = True
'End If
End Sub
'************************************************* ******
' cmdCompany_SelectedIndexChanged function
' This function is called when the cmdCompany combo box is clicked
'************************************************* ******
Private Sub cmdLocation_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdLocation.SelectedIndexChanged
Dim labInfo As DrugFiles.Components.InstantTestDetailDb = New
DrugFiles.Components.InstantTestDetailDb
Dim ilocid As Decimal = 0
Dim iCollectionSite As Long = 0
If (cmdLocation.SelectedValue = Nothing) Then
ilocid = 0 Else ilocid =
cmdLocation.SelectedValue End If
PnlCollectionMatch.Visible = False
lblCollectionSiteID.Text = "0"
End Sub
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSave.Click
Dim labInfo As DrugFiles.Components.InstantTestDetailDb = New
DrugFiles.Components.InstantTestDetailDb
Dim AppID As Decimal =
CDec(Request.Cookies("DrugFileUser_ID").Value())
Dim NewOrderId As Decimal
Dim iLevel9 As Decimal = 0
Dim iRange As Integer = 0
Dim iadultpanel As Integer = 0
Dim sSchCode As String
Dim sName As String
Dim ilocid As Long
Dim iCompid As Long
Dim iSiteid As Long
Dim icalledintime As Integer
Dim iExecptionApproved As Integer
Dim iService As Integer
Dim lScheduleDrugTestID As Long
Dim icoll As Long

sName = txtDonor.Text
lblZipError.Text = ""
sSchCode = Mid(sName, 1, 1) + Format(Now, "Mddyhms")
If cmdCollectionSite.SelectedValue = Nothing Then
icoll = -1
Else
If cmdCollectionSite.SelectedValue <> "Out Of Network" Then
icoll = cmdCollectionSite.SelectedValue
Else
icoll = 0
End If
End If
If (cmdLocation.SelectedValue = Nothing) Then
ilocid = 0
Else
ilocid = cmdLocation.SelectedValue
End If
If cmdSite.SelectedValue = Nothing Then
iSiteid = 0 Else iSiteid = cmdSite.SelectedValue
End If
If cmdCompany.SelectedValue = Nothing Then
iCompid = 0 Else iCompid =
cmdCompany.SelectedValue
End If If cmdAllottedTime.SelectedValue = "1" Then
icalledintime = 1
Else icalledintime = 0 End If
iExecptionApproved = CInt(cmdExecptionApproved.SelectedValue)
iService = -1
If rbnService.Items(0).Selected Then iService = 1
ElseIf rbnService.Items(1).Selected Then iService = 2
ElseIf rbnService.Items(2).Selected Then iService = 3
End If
If CLng(Request.Params("ScheduleDrugTestID")) > 0 Then
If lblCollectionSiteID.Text <> "0" Then
lScheduleDrugTestID =
labInfo.AddScheduleTestDetail(Request.Params("Sche duleDrugTestID"),
txtSchCode.Text, iCompid, iSiteid, ilocid, CLng(lblCollectionSiteID.Text),
txtDonor.Text, txtSSN.Text, TxtHomePhone.Text, txtCellPhone.Text,
dtaccepted.SelectedDate.ToString, dtDFSchdate.SelectedDate.ToString, "",
cmdReason.SelectedValue, icalledintime, iExecptionApproved, txtapproved.Text,
txtApprovalnotes.Text, txtRemark.Text, iService, txtAddress.Text,
txtCity.Text, cmdState.SelectedValue, txtDonorZipCode.Text)
Else lblZipError.Text = "Must select atleast one
collection site !!"
End If

Response.Redirect("SchedulingTestDetail.aspx?Sched uleDrugTestID=" &
lScheduleDrugTestID)
Else
If icoll < 0 Then lblZipError.Text = "Must select
atleast one collection site !!" Else
lScheduleDrugTestID =
labInfo.AddScheduleTestDetail(Request.Params("Sche duleDrugTestID"), sSchCode,
iCompid, iSiteid, ilocid, CLng(lblCollectionSiteID.Text), txtDonor.Text,
txtSSN.Text, TxtHomePhone.Text, txtCellPhone.Text,
dtaccepted.SelectedDate.ToString, dtDFSchdate.SelectedDate.ToString, "",
cmdReason.SelectedValue, icalledintime, iExecptionApproved, txtapproved.Text,
txtApprovalnotes.Text, txtRemark.Text, iService, txtAddress.Text,
txtCity.Text, cmdState.SelectedValue, txtDonorZipCode.Text)

Response.Redirect("SchedulingTestDetail.aspx?Sched uleDrugTestID=" &
lScheduleDrugTestID)
End If
End If
End Sub
Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Response.Redirect("SchedulingTestDetail.aspx?Sched uleDrugTestID=0")
End Sub
Private Sub cmdCollectionSite_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdCollectionSite.SelectedIndexChanged
Dim labInfo As DrugFiles.Components.InstantTestDetailDb = New
DrugFiles.Components.InstantTestDetailDb
lblCollectionSiteID.Text = cmdCollectionSite.SelectedValue
If cmdCollectionSite.SelectedValue <> "Out Of Network" Then
txtCollectionDetails.Text =
labInfo.GetCollectionSitesAddress(cmdCollectionSit e.SelectedValue)

End If

labInfo = Nothing
End Sub
Private Sub cmdAllottedTime_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
cmdAllottedTime.SelectedIndexChanged
If cmdAllottedTime.SelectedValue <> "" Then
If cmdAllottedTime.SelectedValue = "1" Then
pnlApproval.Visible = False
Else
pnlApproval.Visible = True
End If
End If

End Sub

Private Sub btnSearchCS_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSearchCS.Click
Dim ilocid As Long
Dim iSiteID As Long
If (cmdLocation.SelectedValue = Nothing) Then
ilocid = 0
Else
ilocid = cmdLocation.SelectedValue
End If
If cmdSite.SelectedValue = Nothing Then
iSiteID = 0
Else
iSiteID = cmdSite.SelectedValue
End If
Dim labInfo As DrugFiles.Components.InstantTestDetailDb = New
DrugFiles.Components.InstantTestDetailDb
lblZipError.Text = ""
lblState.Text = ""
txtCollectionDetails.Text = ""
If Len(txtDonorZipCode.Text) >= 5 And cmdState.SelectedValue <> ""
Then ' Zip code should have alreast 6 digits
Dim Address As String
Dim City As String
Dim zipcode As String
Dim State As String
Dim dlatitude As Decimal
Dim dLongitute As Decimal
Address = txtAddress.Text
City = txtCity.Text
State = cmdState.SelectedValue
zipcode = txtDonorZipCode.Text
Dim geoAPI As DrugFiles.Components.GeoAddressAPI = New
DrugFiles.Components.GeoAddressAPI
Dim geoaddress As GeoAddress = geoAPI.GeoEncodeAddress(Address,
City, State, zipcode)
If geoaddress.ErrorMessage = "" Then
dlatitude = CDec(geoaddress.Latitude)
dLongitute = CDec(geoaddress.Longitude)

cmdCollectionSite.DataSource =
labInfo.GetCollectionSitesForCSL(cmdCompany.Select edValue, iSiteID, ilocid,
dlatitude, dLongitute)
cmdCollectionSite.DataTextField = "CSName"
cmdCollectionSite.DataValueField = "COLLECTIONSITEID"
cmdCollectionSite.DataBind()
cmdCollectionSite.Items.Insert(0, "Out Of Network")
cmdCollectionSite.Items(0).Selected = True
If cmdCollectionSite.SelectedValue <> "Out Of Network" Then
txtCollectionDetails.Text =
labInfo.GetCollectionSitesAddress(cmdCollectionSit e.SelectedValue)
End If
PnlCollectionMatch.Visible = True
Else
txtCollectionDetails.Text = geoaddress.ErrorMessage

End If
Else
If cmdState.SelectedValue = "" Then
lblState.Text = "State Left Blank"
ElseIf Len(txtDonorZipCode.Text) < 5 Then
lblZipError.Text = "ZipCode Should have atleast 5 digits"
End If
End If
labInfo = Nothing
End Sub
End Class

Apr 13 '06 #5

P: n/a
Not that much code! And what do you mean.."someone else's data".

Jeff

"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
Here in my web application, I have a data entry page with serval controls.
Some of the controls have autopostback is set true.
But the problem is when two or more people are entering data at the same
time, in the middle of my data entry , it is brining someelse data on my
screen.
I look everywhere i could not find the solution. Please help me

Radx

Apr 13 '06 #6

P: n/a
Sorry about that .

When 2 people are using the page , one person sees the other person's data
on his screen. Both the people are just entering the data and have not saved
it

"Jeff Dillon" wrote:
Not that much code! And what do you mean.."someone else's data".

Jeff

"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
Here in my web application, I have a data entry page with serval controls.
Some of the controls have autopostback is set true.
But the problem is when two or more people are entering data at the same
time, in the middle of my data entry , it is brining someelse data on my
screen.
I look everywhere i could not find the solution. Please help me

Radx


Apr 13 '06 #7

P: n/a
What do you mean, the other persons data?? If I type in ABC on one screen,
are you saying it "magically" types in on the other screen also? Even with
their fingers off the keyboard?

When you load a web page...what you see is what is loaded from the database,
and then the data is static until saved. Then the other person opens a
screen, and THEY see what is loaded from the database.

Jeff

"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Sorry about that .

When 2 people are using the page , one person sees the other person's data
on his screen. Both the people are just entering the data and have not
saved
it

"Jeff Dillon" wrote:
Not that much code! And what do you mean.."someone else's data".

Jeff

"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
> Here in my web application, I have a data entry page with serval
> controls.
> Some of the controls have autopostback is set true.
> But the problem is when two or more people are entering data at the
> same
> time, in the middle of my data entry , it is brining someelse data on
> my
> screen.
> I look everywhere i could not find the solution. Please help me
>
> Radx
>


Apr 13 '06 #8

P: n/a
What i mean is.

I have some controls with autopostback set to true, So when i am entering
the data and making selection in the controls(autopostback=true) at that time
screen refreshes and bring someone else data. As the other person also
entering the data and have not saved it.
This only happens when the screen refreshes.

"Jeff Dillon" wrote:
What do you mean, the other persons data?? If I type in ABC on one screen,
are you saying it "magically" types in on the other screen also? Even with
their fingers off the keyboard?

When you load a web page...what you see is what is loaded from the database,
and then the data is static until saved. Then the other person opens a
screen, and THEY see what is loaded from the database.

Jeff

"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:7B**********************************@microsof t.com...
Sorry about that .

When 2 people are using the page , one person sees the other person's data
on his screen. Both the people are just entering the data and have not
saved
it

"Jeff Dillon" wrote:
Not that much code! And what do you mean.."someone else's data".

Jeff

"Radx" <Ra**@discussions.microsoft.com> wrote in message
news:B0**********************************@microsof t.com...
> Here in my web application, I have a data entry page with serval
> controls.
> Some of the controls have autopostback is set true.
> But the problem is when two or more people are entering data at the
> same
> time, in the middle of my data entry , it is brining someelse data on
> my
> screen.
> I look everywhere i could not find the solution. Please help me
>
> Radx
>


Apr 14 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.