DataGrid

Is it possible for a row to be added on the top of the datagrid with an

x symbol so that it closes the datagrid, closes=making the DataGrid.visible = false on the client side maybe like a div thing, down below is my code...

I am using VB.NET and a webapp

A fancy look for it is acceptable....the x should be present on the Datagrid if possible..

<DIV id="DIV1" style="BORDER-RIGHT: black 1px groove; BORDER-TOP: black 1px groove; Z-INDEX: 187; LEFT: 175px; VERTICAL-ALIGN: top; OVERFLOW: auto; BORDER-LEFT: black 1px groove; WIDTH: 818px; BORDER-BOTTOM: black 1px groove; POSITION: absolute; TOP: 140px; HEIGHT: 375px" runat="server">
<P><asp:datagrid id="DataGrid1" runat="server" BorderWidth="1px" BackColor="#FFFFC0" BorderColor="Black" BorderStyle="Solid" Height="150px" Width="815px" ForeColor="Black" Font-Size="Smaller" AutoGenerateColumns="False" HorizontalAlign="Left" ShowFooter="True">
<ItemStyle Font-Size="XX-Small" Font-Names="Verdana" HorizontalAlign="Left"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:ButtonColumn DataTextField="INSURANCE" HeaderText="Insurance Carrier " CommandName="Select"></asp:ButtonColumn>
<asp:BoundColumn Visible="False" DataField="INSNAME" HeaderText="INSNAME"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="INSCODE" HeaderText="INSCODE"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="Address" HeaderText="Address"></asp:BoundColumn>
</Columns>
</asp:datagrid></P>
</DIV>
LVL 4
Moizsaif123Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BustaroomsConnect With a Mentor Commented:
<HTML>
<BODY>  

<DIV id="DIV1" style="BORDER-RIGHT: black 1px groove; BORDER-TOP: black 1px groove; Z-INDEX: 187; LEFT: 175px; VERTICAL-ALIGN: top; OVERFLOW: auto; BORDER-LEFT: black 1px groove; WIDTH: 818px; BORDER-BOTTOM: black 1px groove; POSITION: absolute; TOP: 140px; HEIGHT: 375px" runat="server">

<div id="toolbar" style="background-color:lightgreen; text-align:right; width: 100%; height: 20px;color: white">
<a href="#" onclick="document.getElementById('grid').style.display='none';return false;">X</a></div>

<div id="grid">
info inside grid
<!--   this is all your ASP stuff that I can't see when i'm testing
<P><asp:datagrid id="DataGrid1" runat="server" BorderWidth="1px" BackColor="#FFFFC0" BorderColor="Black" BorderStyle="Solid" Height="150px" Width="815px" ForeColor="Black" Font-Size="Smaller" AutoGenerateColumns="False" HorizontalAlign="Left" ShowFooter="True">
<ItemStyle Font-Size="XX-Small" Font-Names="Verdana" HorizontalAlign="Left"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:ButtonColumn DataTextField="INSURANCE" HeaderText="Insurance Carrier " CommandName="Select"></asp:ButtonColumn>
<asp:BoundColumn Visible="False" DataField="INSNAME" HeaderText="INSNAME"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="INSCODE" HeaderText="INSCODE"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="Address" HeaderText="Address"></asp:BoundColumn>
</Columns>
</asp:datagrid></P>
-->

</div>
</DIV>
</BODY>
</HTML>
0
 
Moizsaif123Author Commented:
umm yea it wont show it because the datagrid is not bound to any data through my asp code...
0
 
BustaroomsCommented:
yes i know.  is it working
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Moizsaif123Author Commented:
yea one more thing tho, i want to make three drop down boxes visible=true once i click the x symbol

the Id of the dropdown boxes are

1)DD_PriRelationship
2)DD_InsState
3)TB_PriInsState


<body bgColor="#d9e5ff" topMargin="50" onload="history.go(+1)" MS_POSITIONING="GridLayout">
            <form language="javascript" id="testForm" method="post" runat="server">
                  <asp:panel id="Panel2" style="Z-INDEX: 102; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server" BorderWidth="8px" BackColor="LightSteelBlue" BorderColor="CornflowerBlue" BorderStyle="Outset" Height="46px" Width="997px">
                        <FONT style="BACKGROUND-COLOR: #c0ffff"></FONT>
                  </asp:panel>
                  <DIV id="DIV1" style="BORDER-RIGHT: black 1px groove; BORDER-TOP: black 1px groove; Z-INDEX: 187; LEFT: 175px; VERTICAL-ALIGN: top; OVERFLOW: auto; BORDER-LEFT: black 1px groove; WIDTH: 818px; BORDER-BOTTOM: black 1px groove; POSITION: absolute; TOP: 140px; HEIGHT: 375px" runat="server">
                        <div id="toolbar" style="WIDTH:100%; COLOR:white; HEIGHT:20px; BACKGROUND-COLOR:lightgreen; TEXT-ALIGN:right">
                              <a href="#" onclick="document.getElementById('DIV1').style.display='none';return false;">
                                    X</a>
                              <asp:datagrid id="DataGrid1" runat="server" BorderWidth="1px" BackColor="#FFFFC0" BorderColor="Black" BorderStyle="Solid" Height="150px" Width="815px" ForeColor="Black" Font-Size="Smaller" AutoGenerateColumns="False" HorizontalAlign="Left" ShowFooter="True">
                                    <ItemStyle Font-Size="XX-Small" Font-Names="Verdana" HorizontalAlign="Left"></ItemStyle>
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Center"></HeaderStyle>
                                    <Columns>
                                          <asp:ButtonColumn DataTextField="INSURANCE" HeaderText="Insurance Carrier " CommandName="Select"></asp:ButtonColumn>
                                          <asp:BoundColumn Visible="False" DataField="INSNAME" HeaderText="INSNAME"></asp:BoundColumn>
                                          <asp:BoundColumn Visible="False" DataField="INSCODE" HeaderText="INSCODE"></asp:BoundColumn>
                                          <asp:BoundColumn Visible="False" DataField="Address" HeaderText="Address"></asp:BoundColumn>
                                    </Columns>
                              </asp:datagrid>
                        </div>
                  </DIV>
                  <asp:label id="Lbl_SSno" style="Z-INDEX: 182; LEFT: 708px; POSITION: absolute; TOP: 279px" runat="server" Height="21px" Width="14px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">SS</asp:label><asp:textbox onkeypress="formatSSN(this);" id="TB_SSno" onkeyup="Submit1_onchange(this.value)" style="Z-INDEX: 119; LEFT: 735px; POSITION: absolute; TOP: 271px" tabIndex="12" runat="server" BorderStyle="Solid" Height="26px" Width="138px" MaxLength="11"></asp:textbox><asp:label id="Lbl_DemDOBFormat" style="Z-INDEX: 161; LEFT: 736px; POSITION: absolute; TOP: 390px" runat="server" Height="18px" Width="90px" ForeColor="DarkSlateBlue" Font-Size="16px" Font-Bold="True">(mm/dd/yyyy)</asp:label><asp:label id="Lbl_PrimaryAddress2" style="Z-INDEX: 152; LEFT: 655px; POSITION: absolute; TOP: 198px" runat="server" Height="18px" Width="71px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Address2</asp:label><asp:label id="Label9" style="Z-INDEX: 151; LEFT: 189px; POSITION: absolute; TOP: 84px" runat="server" Height="14px" Width="24px" Font-Size="Small" Font-Bold="True" Font-Underline="True">Primary</asp:label><asp:textbox id="TB_PrimaryInsAddress1" style="Z-INDEX: 150; LEFT: 732px; POSITION: absolute; TOP: 162px" tabIndex="34" runat="server" BorderStyle="Solid" Height="24px" Width="254px"></asp:textbox><asp:label id="Lbl_PrimaryFname" style="Z-INDEX: 149; LEFT: 644px; POSITION: absolute; TOP: 144px" runat="server" Height="16px" Width="85px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">First Name</asp:label><asp:label id="Lbl_PrimTitle" style="Z-INDEX: 105; LEFT: 660px; POSITION: absolute; TOP: 80px" runat="server" Height="20px" Width="66px" Font-Size="Small" Font-Bold="True" Font-Underline="True" DESIGNTIMEDRAGDROP="17">Insured</asp:label><asp:label id="Lbl_PrimaryLname" style="Z-INDEX: 107; LEFT: 645px; POSITION: absolute; TOP: 115px" runat="server" Height="16px" Width="84px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Last Name</asp:label><asp:label id="Lbl_PrimaryMiddleInt" style="Z-INDEX: 109; LEFT: 892px; POSITION: absolute; TOP: 112px" runat="server" Height="18px" Width="30px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">MI</asp:label><asp:textbox id="TB_InsMiddleInt0" style="Z-INDEX: 111; LEFT: 920px; POSITION: absolute; TOP: 108px" tabIndex="32" runat="server" BorderStyle="Solid" Height="24px" Width="39px" MaxLength="1"></asp:textbox><asp:textbox id="TB_InsFname" style="Z-INDEX: 145; LEFT: 732px; POSITION: absolute; TOP: 135px" tabIndex="33" runat="server" BorderStyle="Solid" Height="24px" Width="130px" DESIGNTIMEDRAGDROP="23"></asp:textbox><asp:textbox id="TB_InsLname" style="Z-INDEX: 146; LEFT: 732px; POSITION: absolute; TOP: 108px" tabIndex="31" runat="server" BorderStyle="Solid" Height="24px" Width="130"></asp:textbox><asp:textbox id="TB_InsCity" style="Z-INDEX: 140; LEFT: 835px; POSITION: absolute; TOP: 244px" tabIndex="36" runat="server" BorderStyle="Solid" Height="24px" Width="133px"></asp:textbox><asp:label id="Lbl_PrimaryCity" style="Z-INDEX: 118; LEFT: 802px; POSITION: absolute; TOP: 251px" runat="server" Height="9px" Width="35px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">City</asp:label><asp:label id="Lbl_PrimaryAddress1" style="Z-INDEX: 112; LEFT: 656px; POSITION: absolute; TOP: 171px" runat="server" Height="13px" Width="71px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Address1</asp:label><asp:label id="Lbl_PrimarySate" style="Z-INDEX: 124; LEFT: 690px; POSITION: absolute; TOP: 252px" runat="server" Height="16px" Width="45px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">State</asp:label><asp:label id="Lbl_PrimaryZipCode" style="Z-INDEX: 120; LEFT: 705px; POSITION: absolute; TOP: 225px" runat="server" Height="15px" Width="24px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Zip</asp:label><asp:textbox id="TB_PrimaryZipCode" style="Z-INDEX: 122; LEFT: 734px; POSITION: absolute; TOP: 216px" tabIndex="38" runat="server" BorderStyle="Solid" Height="24px" Width="72px" Font-Size="X-Small"></asp:textbox><asp:textbox id="TB_InsSex" onkeyup="Submit1_onchange()" style="Z-INDEX: 116; LEFT: 920px; POSITION: absolute; TOP: 134px" tabIndex="39" runat="server" BorderStyle="Solid" Height="23px" Width="39px" MaxLength="1"></asp:textbox><asp:label id="Lbl_PrimarySex" style="Z-INDEX: 125; LEFT: 887px; POSITION: absolute; TOP: 142px" runat="server" Height="20px" Width="29px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Sex</asp:label><asp:label id="Lbl_ResidentInsPhone1" style="Z-INDEX: 126; LEFT: 637px; POSITION: absolute; TOP: 309px" runat="server" Height="16px" Width="98px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Phone(Res)</asp:label><asp:textbox onkeypress="maskIt(this)" id="TB_ResidentInsPhone1" style="Z-INDEX: 127; LEFT: 735px; POSITION: absolute; TOP: 300px" tabIndex="40" runat="server" BorderStyle="Solid" Height="26" Width="128" MaxLength="13"></asp:textbox><asp:label id="Lbl_WorkInsPhone1" style="Z-INDEX: 131; LEFT: 642px; POSITION: absolute; TOP: 338px" runat="server" Height="24px" Width="89px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Phone(Off)</asp:label><asp:label id="Lbl_PrimaryExt" style="Z-INDEX: 117; LEFT: 885px; POSITION: absolute; TOP: 339px" runat="server" Height="16px" Width="29px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Ext:</asp:label><asp:textbox id="TB_PrimaryExt" style="Z-INDEX: 114; LEFT: 919px; POSITION: absolute; TOP: 330px" tabIndex="42" runat="server" BorderStyle="Solid" Height="24px" Width="49px"></asp:textbox><asp:label id="Lbl_PrimaryDOB" style="Z-INDEX: 133; LEFT: 696px; POSITION: absolute; TOP: 372px" runat="server" Height="13px" Width="32px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">DOB</asp:label><asp:textbox id="TB_InsDOB" onblur="DateFormat(this,this.value,event,true,'1')" onkeyup="DateFormat(this,this.value,event,false,'1')" style="Z-INDEX: 147; LEFT: 736px; POSITION: absolute; TOP: 360px" onfocus="javascript:vDateType='1'" tabIndex="43" runat="server" BorderStyle="Solid" Height="26" Width="128" MaxLength="10"></asp:textbox><asp:textbox onkeypress="maskIt(this)" id="TB_OffInsPhone" style="Z-INDEX: 148; LEFT: 735px; POSITION: absolute; TOP: 330px" tabIndex="41" runat="server" BorderStyle="Solid" Height="26px" Width="128px" MaxLength="13"></asp:textbox><asp:panel id="Panel1" style="Z-INDEX: 101; LEFT: -3px; POSITION: absolute; TOP: 43px" runat="server" BackColor="LightSlateGray" BorderStyle="Groove" Height="549px" Width="176px" Wrap="False">
                        <P>&nbsp;</P>
                        <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</P>
                        <P>&nbsp;&nbsp;&nbsp;
                        </P>
                        <P>&nbsp;</P>
                        <P>&nbsp;</P>
                  </asp:panel><asp:label id="Lbl_InsuredEmpTitle" style="Z-INDEX: 103; LEFT: 195px; POSITION: absolute; TOP: 287px" runat="server" Height="22px" Width="154px" Font-Size="Small" Font-Bold="True" Font-Names="Tunga" Font-Underline="True">Insured Employer</asp:label><asp:label id="Lbl_PrimInsName" style="Z-INDEX: 104; LEFT: 212px; POSITION: absolute; TOP: 320px" runat="server" Height="14px" Width="33px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Name</asp:label><asp:textbox id="TB_PriInsName" style="Z-INDEX: 106; LEFT: 260px; POSITION: absolute; TOP: 311px" tabIndex="23" runat="server" BorderStyle="Solid" Height="24px" Width="222px"></asp:textbox><asp:label id="Lbl_EmpAddPrimary" style="Z-INDEX: 108; LEFT: 185px; POSITION: absolute; TOP: 347px" runat="server" Height="17px" Width="60px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Address1</asp:label><asp:textbox id="TB_PriInsAdd1" style="Z-INDEX: 110; LEFT: 260px; POSITION: absolute; TOP: 339px" tabIndex="24" runat="server" BorderStyle="Solid" Height="24px" Width="338"></asp:textbox><asp:label id="LBL_PriResPhone" style="Z-INDEX: 113; LEFT: 242px; POSITION: absolute; TOP: 171px" runat="server" Height="19px" Width="50px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Phone</asp:label><asp:label id="Label2" style="Z-INDEX: 115; LEFT: 192px; POSITION: absolute; TOP: 119px" runat="server" Height="23px" Width="106px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Carrier Name</asp:label><asp:textbox onkeypress="maskIt(this)" id="txtphone" style="Z-INDEX: 121; LEFT: 297px; POSITION: absolute; TOP: 167px" tabIndex="19" runat="server" BorderStyle="Solid" Height="24px" Width="148px" MaxLength="13"></asp:textbox><asp:textbox id="TB_PriCityIns" style="Z-INDEX: 128; LEFT: 358px; POSITION: absolute; TOP: 421px" tabIndex="26" runat="server" BorderStyle="Solid" Height="24px" Width="136px"></asp:textbox><asp:label id="Lbl_PrimaryCityInsuredEmp" style="Z-INDEX: 129; LEFT: 324px; POSITION: absolute; TOP: 428px" runat="server" Height="14px" Width="27px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">City</asp:label><asp:label id="Lbl_PrimaryInsState" style="Z-INDEX: 130; LEFT: 219px; POSITION: absolute; TOP: 430px" runat="server" Height="22px" Width="36px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">State</asp:label><asp:textbox id="TB_PriInsZip2" style="Z-INDEX: 132; LEFT: 261px; POSITION: absolute; TOP: 394px" tabIndex="28" runat="server" BorderStyle="Solid" Height="24px" Width="89px"></asp:textbox><asp:label id="Lbl_PrimaryInsZipcode" style="Z-INDEX: 134; LEFT: 233px; POSITION: absolute; TOP: 404px" runat="server" Height="14px" Width="20px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Zip</asp:label><asp:label id="Lbl_PrimaryInsPhone" style="Z-INDEX: 135; LEFT: 207px; POSITION: absolute; TOP: 482px" runat="server" Height="14px" Width="38px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Phone</asp:label><asp:textbox onkeypress="maskIt(this)" id="TB_PriInsPhn" style="Z-INDEX: 136; LEFT: 261px; POSITION: absolute; TOP: 474px" tabIndex="30" runat="server" BorderStyle="Solid" Height="24px" Width="136px" MaxLength="13"></asp:textbox><asp:textbox onkeypress="maskIt(this)" id="TB_PriInsFaxNo" style="Z-INDEX: 137; LEFT: 261px; POSITION: absolute; TOP: 448px" tabIndex="29" runat="server" BorderStyle="Solid" Height="24px" Width="136px" MaxLength="13"></asp:textbox><asp:label id="Lbl_PrimaryFaxNo" style="Z-INDEX: 138; LEFT: 229px; POSITION: absolute; TOP: 457px" runat="server" Height="16px" Width="24px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Fax</asp:label><asp:button id="Btn_PrimaryIns" onmouseover="this.style.color = '#000099'" style="Z-INDEX: 139; LEFT: 240px; POSITION: absolute; TOP: 51px" onmouseout="this.style.color = '#000033'" runat="server" BorderWidth="5px" BackColor="Control" BorderColor="#E0E0E0" BorderStyle="Inset" Height="31" Width="117" Font-Size="X-Small" Font-Names="Bookman Old Style" Font-Italic="True" Text="Primary"></asp:button><asp:label id="Lbl_Relationship" style="Z-INDEX: 141; LEFT: 196px; POSITION: absolute; TOP: 251px" runat="server" Height="5px" Width="52px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Relationship</asp:label><asp:label id="Lbl_EmpAddress2" style="Z-INDEX: 142; LEFT: 185px; POSITION: absolute; TOP: 376px" runat="server" Height="20px" Width="56px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Address2</asp:label><asp:textbox id="TB_PriInsAdd2" style="Z-INDEX: 143; LEFT: 261px; POSITION: absolute; TOP: 367px" tabIndex="25" runat="server" BorderStyle="Solid" Height="24px" Width="338px"></asp:textbox><asp:label id="Label6" style="Z-INDEX: 144; LEFT: 449px; POSITION: absolute; TOP: 12px" runat="server" BackColor="LightSteelBlue" Height="21px" Width="177px" Font-Size="Medium" Font-Bold="True" Font-Italic="True">Patient Insurance </asp:label><asp:label id="Lbl_PriGrpNo" style="Z-INDEX: 153; LEFT: 179px; POSITION: absolute; TOP: 227px" runat="server" Width="119px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Group Number</asp:label><asp:label id="LBL_PriPolicyNo" style="Z-INDEX: 154; LEFT: 181px; POSITION: absolute; TOP: 201px" runat="server" Height="16px" Width="116px" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Policy Number</asp:label><asp:textbox id="TB_PriPolicyNo" style="Z-INDEX: 155; LEFT: 297px; POSITION: absolute; TOP: 194px" tabIndex="20" runat="server" BorderStyle="Solid" Height="24px" Width="148px"></asp:textbox><asp:textbox id="TB_PriGrpNo" style="Z-INDEX: 156; LEFT: 297px; POSITION: absolute; TOP: 221px" tabIndex="21" runat="server" BorderStyle="Solid" Height="24px" Width="149px"></asp:textbox><asp:regularexpressionvalidator id="RegularExpressionValidator1" style="Z-INDEX: 157; LEFT: 454px; POSITION: absolute; TOP: 173px" runat="server" Height="21px" Width="5px" ErrorMessage="RegularExpressionValidator" ControlToValidate="txtphone" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">*</asp:regularexpressionvalidator><asp:regularexpressionvalidator id="RegularExpressionValidator2" style="Z-INDEX: 158; LEFT: 863px; POSITION: absolute; TOP: 305px" runat="server" Height="12px" Width="8px" ErrorMessage="RegularExpressionValidator" ControlToValidate="TB_ResidentInsPhone1" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">*</asp:regularexpressionvalidator><asp:regularexpressionvalidator id="RegularExpressionValidator3" style="Z-INDEX: 159; LEFT: 398px; POSITION: absolute; TOP: 482px" runat="server" Width="3px" ErrorMessage="RegularExpressionValidator" ControlToValidate="TB_PriInsPhn" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">*</asp:regularexpressionvalidator><asp:regularexpressionvalidator id="RegularExpressionValidator4" style="Z-INDEX: 160; LEFT: 864px; POSITION: absolute; TOP: 339px" runat="server" Height="4px" Width="2px" ErrorMessage="RegularExpressionValidator" ControlToValidate="TB_OffInsPhone" ValidationExpression="((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}">*</asp:regularexpressionvalidator><asp:comparevalidator id="CompareValidator2" style="Z-INDEX: 162; LEFT: 967px; POSITION: absolute; TOP: 335px" runat="server" Height="16px" Width="6px" ErrorMessage="CompareValidator" ControlToValidate="TB_PrimaryExt" Type="Integer" ValueToCompare="0" Operator="GreaterThan">*</asp:comparevalidator><asp:comparevalidator id="CompareValidator3" style="Z-INDEX: 163; LEFT: 807px; POSITION: absolute; TOP: 224px" runat="server" Height="15px" Width="6px" ErrorMessage="CompareValidator" ControlToValidate="TB_PrimaryZipCode" Type="Integer" ValueToCompare="0" Operator="GreaterThan">*</asp:comparevalidator><asp:dropdownlist id="DD_PriRelationship" style="Z-INDEX: 164; LEFT: 296px; POSITION: absolute; TOP: 248px" tabIndex="22" runat="server" Height="20px" Width="129px">
                        <asp:ListItem Value="Self">Self</asp:ListItem>
                        <asp:ListItem Value="Spouse">Spouse</asp:ListItem>
                        <asp:ListItem Value="Child">Child</asp:ListItem>
                        <asp:ListItem Value="Other">Other</asp:ListItem>
                  </asp:dropdownlist><asp:textbox id="TB_PrimaryAddress2" style="Z-INDEX: 165; LEFT: 733px; POSITION: absolute; TOP: 189px" tabIndex="35" runat="server" BorderStyle="Solid" Height="24px" Width="252px"></asp:textbox><asp:dropdownlist id="DD_InsState" style="Z-INDEX: 166; LEFT: 736px; POSITION: absolute; TOP: 244px" tabIndex="37" runat="server" Height="27px" Width="57px">
                        <asp:ListItem Value="AL">AL</asp:ListItem>
                        <asp:ListItem Value="AK">AK</asp:ListItem>
                        <asp:ListItem Value="AZ">AZ</asp:ListItem>
                        <asp:ListItem Value="AR">AR</asp:ListItem>
                        <asp:ListItem Value="CA">CA</asp:ListItem>
                        <asp:ListItem Value="CO">CO</asp:ListItem>
                        <asp:ListItem Value="CT">CT</asp:ListItem>
                        <asp:ListItem Value="DE">DE</asp:ListItem>
                        <asp:ListItem Value="DC">DC</asp:ListItem>
                        <asp:ListItem Value="FL">FL</asp:ListItem>
                        <asp:ListItem Value="GA">GA</asp:ListItem>
                        <asp:ListItem Value="GU">GU</asp:ListItem>
                        <asp:ListItem Value="HI">HI</asp:ListItem>
                        <asp:ListItem Value="ID">ID</asp:ListItem>
                        <asp:ListItem Value="IL">IL</asp:ListItem>
                        <asp:ListItem Value="IN">IN</asp:ListItem>
                        <asp:ListItem Value="IA">IA</asp:ListItem>
                        <asp:ListItem Value="KS">KS</asp:ListItem>
                        <asp:ListItem Value="KY">KY</asp:ListItem>
                        <asp:ListItem Value="LA">LA</asp:ListItem>
                        <asp:ListItem Value="ME">ME</asp:ListItem>
                        <asp:ListItem Value="MD">MD</asp:ListItem>
                        <asp:ListItem Value="MA">MA</asp:ListItem>
                        <asp:ListItem Value="MI">MI</asp:ListItem>
                        <asp:ListItem Value="MN">MN</asp:ListItem>
                        <asp:ListItem Value="MS">MS</asp:ListItem>
                        <asp:ListItem Value="MO">MO</asp:ListItem>
                        <asp:ListItem Value="MT">MT</asp:ListItem>
                        <asp:ListItem Value="NE">NE</asp:ListItem>
                        <asp:ListItem Value="NV">NV</asp:ListItem>
                        <asp:ListItem Value="NH">NH</asp:ListItem>
                        <asp:ListItem Value="NJ">NJ</asp:ListItem>
                        <asp:ListItem Value="NM">NM</asp:ListItem>
                        <asp:ListItem Value="NY">NY</asp:ListItem>
                        <asp:ListItem Value="NC">NC</asp:ListItem>
                        <asp:ListItem Value="ND">ND</asp:ListItem>
                        <asp:ListItem Value="OH">OH</asp:ListItem>
                        <asp:ListItem Value="OK">OK</asp:ListItem>
                        <asp:ListItem Value="OR">OR</asp:ListItem>
                        <asp:ListItem Value="PA">PA</asp:ListItem>
                        <asp:ListItem Value="PR">PR</asp:ListItem>
                        <asp:ListItem Value="PI">PI</asp:ListItem>
                        <asp:ListItem Value="SC">SC</asp:ListItem>
                        <asp:ListItem Value="SD">SD</asp:ListItem>
                        <asp:ListItem Value="TN">TN</asp:ListItem>
                        <asp:ListItem Value="TX">TX</asp:ListItem>
                        <asp:ListItem Value="UT">UT</asp:ListItem>
                        <asp:ListItem Value="VT">VT</asp:ListItem>
                        <asp:ListItem Value="VI">VI</asp:ListItem>
                        <asp:ListItem Value="VA">VA</asp:ListItem>
                        <asp:ListItem Value="WA">WA</asp:ListItem>
                        <asp:ListItem Value="WV">WV</asp:ListItem>
                        <asp:ListItem Value="WI">WI</asp:ListItem>
                        <asp:ListItem Value="WY">WY</asp:ListItem>
                  </asp:dropdownlist><asp:dropdownlist id="TB_PriInsState" style="Z-INDEX: 167; LEFT: 262px; POSITION: absolute; TOP: 421px" tabIndex="27" runat="server" Height="29px" Width="57px">
                        <asp:ListItem Value="AL">AL</asp:ListItem>
                        <asp:ListItem Value="AK">AK</asp:ListItem>
                        <asp:ListItem Value="AZ">AZ</asp:ListItem>
                        <asp:ListItem Value="AR">AR</asp:ListItem>
                        <asp:ListItem Value="CA">CA</asp:ListItem>
                        <asp:ListItem Value="CO">CO</asp:ListItem>
                        <asp:ListItem Value="CT">CT</asp:ListItem>
                        <asp:ListItem Value="DE">DE</asp:ListItem>
                        <asp:ListItem Value="DC">DC</asp:ListItem>
                        <asp:ListItem Value="FL">FL</asp:ListItem>
                        <asp:ListItem Value="GA">GA</asp:ListItem>
                        <asp:ListItem Value="GU">GU</asp:ListItem>
                        <asp:ListItem Value="HI">HI</asp:ListItem>
                        <asp:ListItem Value="ID">ID</asp:ListItem>
                        <asp:ListItem Value="IL">IL</asp:ListItem>
                        <asp:ListItem Value="IN">IN</asp:ListItem>
                        <asp:ListItem Value="IA">IA</asp:ListItem>
                        <asp:ListItem Value="KS">KS</asp:ListItem>
                        <asp:ListItem Value="KY">KY</asp:ListItem>
                        <asp:ListItem Value="LA">LA</asp:ListItem>
                        <asp:ListItem Value="ME">ME</asp:ListItem>
                        <asp:ListItem Value="MD">MD</asp:ListItem>
                        <asp:ListItem Value="MA">MA</asp:ListItem>
                        <asp:ListItem Value="MI">MI</asp:ListItem>
                        <asp:ListItem Value="MN">MN</asp:ListItem>
                        <asp:ListItem Value="MS">MS</asp:ListItem>
                        <asp:ListItem Value="MO">MO</asp:ListItem>
                        <asp:ListItem Value="MT">MT</asp:ListItem>
                        <asp:ListItem Value="NE">NE</asp:ListItem>
                        <asp:ListItem Value="NV">NV</asp:ListItem>
                        <asp:ListItem Value="NH">NH</asp:ListItem>
                        <asp:ListItem Value="NJ">NJ</asp:ListItem>
                        <asp:ListItem Value="NM">NM</asp:ListItem>
                        <asp:ListItem Value="NY">NY</asp:ListItem>
                        <asp:ListItem Value="NC">NC</asp:ListItem>
                        <asp:ListItem Value="ND">ND</asp:ListItem>
                        <asp:ListItem Value="OH">OH</asp:ListItem>
                        <asp:ListItem Value="OK">OK</asp:ListItem>
                        <asp:ListItem Value="OR">OR</asp:ListItem>
                        <asp:ListItem Value="PA">PA</asp:ListItem>
                        <asp:ListItem Value="PR">PR</asp:ListItem>
                        <asp:ListItem Value="PI">PI</asp:ListItem>
                        <asp:ListItem Value="SC">SC</asp:ListItem>
                        <asp:ListItem Value="SD">SD</asp:ListItem>
                        <asp:ListItem Value="TN">TN</asp:ListItem>
                        <asp:ListItem Value="TX">TX</asp:ListItem>
                        <asp:ListItem Value="UT">UT</asp:ListItem>
                        <asp:ListItem Value="VT">VT</asp:ListItem>
                        <asp:ListItem Value="VI">VI</asp:ListItem>
                        <asp:ListItem Value="VA">VA</asp:ListItem>
                        <asp:ListItem Value="WA">WA</asp:ListItem>
                        <asp:ListItem Value="WV">WV</asp:ListItem>
                        <asp:ListItem Value="WI">WI</asp:ListItem>
                        <asp:ListItem Value="WY">WY</asp:ListItem>
                  </asp:dropdownlist><asp:imagebutton id="Submit" style="Z-INDEX: 169; LEFT: 752px; POSITION: absolute; TOP: 522px" onfocus="Select1_onchange()" runat="server" Height="40px" Width="104px" ImageUrl="\Patient_Portal\Images\Submit.bmp"></asp:imagebutton><asp:imagebutton id="Btn_SignOut" style="Z-INDEX: 168; LEFT: 72px; POSITION: absolute; TOP: 480px" runat="server" Height="19px" Width="68px" ImageUrl="\Patient_Portal\Images\SignOut.bmp"></asp:imagebutton><asp:imagebutton id="Appointment_Btn" style="Z-INDEX: 170; LEFT: 24px; POSITION: absolute; TOP: 184px" runat="server" ImageUrl="\Patient_Portal\Images\Appointment.bmp"></asp:imagebutton><asp:imagebutton id="Demo_Btn" style="Z-INDEX: 171; LEFT: 24px; POSITION: absolute; TOP: 88px" runat="server" ImageUrl="\Patient_Portal\Images\Demographics.bmp"></asp:imagebutton><asp:imagebutton id="Ins_Btn" style="Z-INDEX: 172; LEFT: 24px; POSITION: absolute; TOP: 136px" runat="server" ImageUrl="\Patient_Portal\Images\Insurance.bmp"></asp:imagebutton><asp:imagebutton id="Pres_Btn" style="Z-INDEX: 173; LEFT: 26px; POSITION: absolute; TOP: 231px" runat="server" Width="128px" ImageUrl="\Patient_Portal\Images\Prescription.bmp"></asp:imagebutton><asp:imagebutton id="Service_Btn" style="Z-INDEX: 174; LEFT: 24px; POSITION: absolute; TOP: 280px" runat="server" Width="132px" ImageUrl="\Patient_Portal\Images\Services.bmp"></asp:imagebutton><asp:textbox id="TB_PrimaryIns" style="Z-INDEX: 175; LEFT: 297px; POSITION: absolute; TOP: 112px" runat="server" BorderStyle="Solid" Width="324px" AutoPostBack="True"></asp:textbox><asp:button id="Btn_Ter" style="Z-INDEX: 176; LEFT: 471px; POSITION: absolute; TOP: 51px" runat="server" BorderWidth="5px" BackColor="Control" BorderColor="#E0E0E0" BorderStyle="Outset" Height="31px" Width="117px" Font-Names="Bookman Old Style" Font-Italic="True" Text="Tertiary" CausesValidation="False"></asp:button><asp:button id="Btn_Secondary" style="Z-INDEX: 178; LEFT: 355px; POSITION: absolute; TOP: 51px" runat="server" BorderWidth="5px" BackColor="Control" BorderColor="#E0E0E0" BorderStyle="Outset" Height="31px" Width="117px" Font-Names="Bookman Old Style" Font-Italic="True" Text="Secondary"></asp:button><asp:label id="Lbl_CarrierNm" style="Z-INDEX: 179; LEFT: 296px; POSITION: absolute; TOP: 96px" runat="server" Width="200px" ForeColor="Red" Font-Size="XX-Small" Font-Bold="True" Font-Names="Raavi" Visible="False">Please Enter Correct Carrier Name</asp:label><asp:imagebutton id="Btn_Recall" style="Z-INDEX: 181; LEFT: 23px; POSITION: absolute; TOP: 329px" runat="server" ImageUrl="\Patient_Portal\Images\Recall.bmp"></asp:imagebutton>
                  <P>
                  <P><asp:textbox id="TB_PriAddress" style="Z-INDEX: 185; LEFT: 297px; POSITION: absolute; TOP: 141px" runat="server" BorderStyle="Solid" Height="23px" Width="325px" ReadOnly="True"></asp:textbox><asp:label id="Lbl_PriAdd" style="Z-INDEX: 186; LEFT: 228px; POSITION: absolute; TOP: 146px" runat="server" ForeColor="DarkSlateBlue" Font-Size="14px" Font-Bold="True" Font-Names="Verdana">Address</asp:label></P>
            </form>
      </body>
0
 
BustaroomsCommented:
i would throw those into their own div and go about it the same way accept display='block'

<a href="#" onclick="document.getElementById('DIV1').style.display='none';document.getElementById('dropdownsDiv').style.display='block';return false;">X</a>
0
 
Moizsaif123Author Commented:
how can i make a control visible=true, lets say TextBox1 is visibly false on design time then

this code i put over in my script...

it doesnt work........

document.getElementById("TextBox1").style.visibility=="visible"
0
 
BustaroomsCommented:
you have two equal signs (==)  it should be just one

you can also try
document.getElementById("TextBox1").style.display="block"
0
 
Moizsaif123Author Commented:
i want to make it visible=true, not visible=false, the one equal sign doesnt make a difference...
0
 
BustaroomsCommented:
the equals sign definately makes a difference in javascript  == is for comparing two values, = sets a value to a variable

have you tried what i posted?  display='block' does not mean visable= false   display='none' means visable='false'
0
 
Moizsaif123Author Commented:
This is a totally new project I created for testing, the textbox here does not dissappear when I click on the button.


<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb" Inherits="WebApplication179.WebForm3"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
      <HEAD>
            <title>WebForm3</title>
            <script>
            function Onload(){
            document.getElementById("TextBox1").style.display='none';
            }
            </script>
            <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
            <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
            <meta name="vs_defaultClientScript" content="JavaScript">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
      </HEAD>
      <body MS_POSITIONING="GridLayout" onload="Onload()">
            <form id="Form1" method="post" runat="server">
                  <asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 137px; POSITION: absolute; TOP: 116px" runat="server" Visible="False"></asp:TextBox>
                  <INPUT id="Submit1" style="Z-INDEX: 102; LEFT: 236px; POSITION: absolute; TOP: 248px" type="submit" value="Submit" name="Submit1" runat="server" language="javascript" onclick="document.getElementById('TextBox1').style.display='block';">
            </form>
      </body>
</HTML>
0
 
gam3r_3xtr3m3Connect With a Mentor Commented:
it doesn't work because ASP .NET id is mainly different from HTML id. simply because when ASP .NET is executed, it would be replacing its id to name (in my experience). also, getElementById is pratically exclusive only for div and span tags.
try this if it works:

<div id="someText" style="display:none;">This is a text! You saw me when you clicked the button.</div>
<input type="button" value="Click to show text" onClick="document.getElementById("someText").style.display='block';" />

then apply it to your ASP .NET code:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm3.aspx.vb" Inherits="WebApplication179.WebForm3"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
     <HEAD>
          <title>WebForm3</title>
          <script>
          function Onload(){
          document.getElementById("div1").style.display='none';
          }
          </script>
          <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
          <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
          <meta name="vs_defaultClientScript" content="JavaScript">
          <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
     </HEAD>
     <body MS_POSITIONING="GridLayout" onload="Onload()">
          <form id="Form1" method="post" runat="server">
             <div id="div1">
               <asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 137px; POSITION: absolute; TOP: 116px" runat="server" Visible="False"></asp:TextBox>
             </div>
               <INPUT id="Submit1" style="Z-INDEX: 102; LEFT: 236px; POSITION: absolute; TOP: 248px" type="submit" value="Submit" name="Submit1" runat="server" language="javascript" onclick="document.getElementById('div1').style.display='block';">
          </form>
     </body>
</HTML>

gam3r
0
 
gam3r_3xtr3m3Commented:
sorry, i got a quote typo, here's the correct one:

<div id="someText" style="display:none;">This is a text! You saw me when you clicked the button.</div>
<input type="button" value="Click to show text" onClick="document.getElementById('someText').style.display='block';" />
0
 
Moizsaif123Author Commented:
Bustarooms,
is it possible to make that X into a asp server control? That will make my life so so much simpler



Moiz
0
 
Moizsaif123Author Commented:
never mind i got it guys thanks for the help


<DIV id="DIV1" style="BORDER-RIGHT: black 1px groove; BORDER-TOP: black 1px groove; Z-INDEX: 182; LEFT: 175px; VERTICAL-ALIGN: top; OVERFLOW: auto; BORDER-LEFT: black 1px groove; WIDTH: 818px; BORDER-BOTTOM: black 1px groove; POSITION: absolute; TOP: 140px; HEIGHT: 375px" runat="server">
                        <div id="toolbar" style="WIDTH: 100%; COLOR: white; HEIGHT: 20px; BACKGROUND-COLOR: lightgreen; TEXT-ALIGN: right">
<asp:LinkButton id="Lnk_CloseGrid" runat="server">X</asp:LinkButton>
<asp:datagrid id="DataGrid1" runat="server" Width="815px" Height="150px" BorderStyle="Solid" BorderColor="Black" BackColor="#FFFFC0" BorderWidth="1px" ShowFooter="True" HorizontalAlign="Left" AutoGenerateColumns="False" Font-Size="Smaller" ForeColor="Black">
<ItemStyle Font-Size="XX-Small" Font-Names="Verdana" HorizontalAlign="Left"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:ButtonColumn DataTextField="INSURANCE" HeaderText="Insurance Carrier " CommandName="Select"></asp:ButtonColumn>
<asp:BoundColumn Visible="False" DataField="INSNAME" HeaderText="INSNAME"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="INSCODE" HeaderText="INSCODE"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="Address" HeaderText="Address"></asp:BoundColumn>
</Columns>
</asp:datagrid></div>
</DIV>
0
All Courses

From novice to tech pro — start learning today.