Click here to Skip to main content
15,936,897 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: I want to show the first lettter of token to be upercase in my code, but it then show the page name and not the token name Pin
hendrikbez26-Feb-23 3:24
hendrikbez26-Feb-23 3:24 
Questionhow to auto print label in vb to be in the database Pin
IsdKirti L&tSou20-Feb-23 0:06
IsdKirti L&tSou20-Feb-23 0:06 
AnswerRe: how to auto print label in vb to be in the database Pin
Richard Deeming20-Feb-23 0:45
mveRichard Deeming20-Feb-23 0:45 
QuestionIs it possible to use OData in local mode? Pin
Alex Wright 202217-Feb-23 21:28
Alex Wright 202217-Feb-23 21:28 
QuestionHow to enable nested json result in OData (ASP.NET Core API) Pin
Alex Wright 202214-Feb-23 20:57
Alex Wright 202214-Feb-23 20:57 
AnswerRe: How to enable nested json result in OData (ASP.NET Core API) Pin
Richard Deeming14-Feb-23 22:11
mveRichard Deeming14-Feb-23 22:11 
GeneralRe: How to enable nested json result in OData (ASP.NET Core API) Pin
Alex Wright 202214-Feb-23 22:33
Alex Wright 202214-Feb-23 22:33 
Question(SOLVED) Having problem showing just a section of a page. Pin
samflex16-Jan-23 10:40
samflex16-Jan-23 10:40 
Greetings again experts.

Could you please help me out on this one.

I have a very long markup page that is used for various activities.

There is a section that allows users to enter a value into a search box and click the search button.

If there is a hit, a page is populated with the values from the search hit.

This works.

If however, the search turns up nothing, then we would like to popup a section of the page with several form controls which allows user to enter the values that did not turn up during search and submit to the database.

I tried using hide/show panel control but nothing is showing up.

I tried hide and show div but no luck.

I would truly appreciate any assistance with this. I am pasting only the section of the code that needs to be displayed in a popup, perhaps in the middle of the page.
Many thanks in advance.

 <ajax:ModalPopupExtender ID="installAddress_MPE" runat="server" TargetControlID="label2" PopupControlID="div5" BackgroundCssClass="modalBackground" />
<div id="div5" runat="server">
 <asp:Table ID="Table1" Style="background-color:White; font-size:12pt; color:Black;" runat="server">
   <asp:TableRow>
     <asp:TableCell ID="TableCell3" Style="background-color:Blue; font-size:14pt; color:White;" runat="server" ColumnSpan="6">
      <asp:Label ID="installAddressHeader" runat="server" Text="New Installation Address Entry" />
     </asp:TableCell>
   </asp:TableRow>
</asp:Table>
<div id="divRebatable" class="popupdiv">
   <asp:TextBox ID="txt_toiletsizes" placeholder="Enter new Toiltet GPF" Width="150px" runat="server"></asp:TextBox>
    <asp:TextBox ID="txt_newAmount" placeholder="Enter amount" Width="100px" runat="server"></asp:TextBox>
    <asp:Button ID="btn_add" runat="server" Text="Add It" onclick="btn_add_Click"
        Width="100px" />
    <asp:Table ID="rebatableTable" Width="100%" runat="server">
        <asp:TableRow CssClass="divHeader"><asp:TableHeaderCell ColumnSpan="4">Add Rebatable Toilets</asp:TableHeaderCell></asp:TableRow>
        <asp:TableRow ID="allToilets" runat="server">
            <asp:TableHeaderCell>How many toilets?</asp:TableHeaderCell>
            <asp:TableCell>
             <asp:DropDownList ID="ddlNumber" runat="server" OnSelectedIndexChanged="ddlNumber_SelectedIndexChanged" AutoPostBack="true">
               <asp:ListItem Text="--Select--" Value=""></asp:ListItem>
               <asp:ListItem Text="1" Value="1"></asp:ListItem>
               <asp:ListItem Text="2" Value="2"></asp:ListItem>
               <asp:ListItem Text="3" Value="3"></asp:ListItem>
             </asp:DropDownList>
            </asp:TableCell>
            </asp:TableRow>
    </asp:Table>
</div>
     <div>
         <asp:Repeater ID="DynamicRepeater" runat="server" onitemdatabound="DynamicRepeater_ItemDataBound">
             <HeaderTemplate>
                 <table border="1">
                     <tr>
                         <td>Toilet Size</td>
                          <td>Model #</td>
                         <td>Date Upgraded</td>
                     </tr>
             </HeaderTemplate>
             <ItemTemplate>
                 <tr>
                     <td>
                   <asp:DropDownList ID="ddlToiletGPF" AutoPostBack="true" runat="server">
                   </asp:DropDownList>
                     </td>
                     <td>
                         <asp:TextBox ID="ModelNumber" runat="server"></asp:TextBox>
                     </td>
                     <td>
                         <asp:TextBox ID="DateUpgraded" runat="server"></asp:TextBox>
                     </td>
                 </tr>
             </ItemTemplate>
             <FooterTemplate>
                 </table>
             </FooterTemplate>
         </asp:Repeater><br />
         <asp:Label ID="lblSuccess" style="font-weight:bold;" runat="server" Text=""></asp:Label>
     </div>
   </div>
   <asp:Label ID="lblMsg" runat="server" Text="" /><br />


    Protected Sub Submit(sender As Object, e As EventArgs)

        Dim address As String = Request.Form(txtSearch.UniqueID)
        Dim speakerId As String = Request.Form(hfAutoId.UniqueID)

        'get the results and fill in the datagrid

        Dim sqlStatement As String = "Select o.PrimaryFirst, o.PrimaryLast, ap.applicant, FORMAT(ap.DateReceived, 'd','us') as DateReceived,o.SecondaryFirst,o.SecondaryLast,ad.InstallAddress,ad.InstallCity, ad.InstallState, ad.InstallZip, ad.WaterAcctNo from Applications ap "
        sqlStatement += "inner Join Addresses ad on ap.WaterAccountNo = ad.WaterAcctNo inner join Owner o on ap.OwnerCode = o.OwnerID Where ad.InstallAddress Like '%" & address.Replace("'", "''").Trim() & "%'"

        Dim sqlCmd2 As SqlCommand = New SqlCommand(sqlStatement, myConnection)
        Dim reader As SqlDataReader = sqlCmd2.ExecuteReader()

        If reader.HasRows Then
            While reader.Read()
                div1.Visible = False
                installationAddress.Text = reader("InstallAddress").ToString() & " " & reader("InstallCity").ToString() & ", " & reader("InstallState").ToString() & " " & reader("InstallZip").ToString()
                waterAccountNumber.Text = reader("WaterAcctNo").ToString()
                ownerInformation.Text = reader("PrimaryFirst").ToString() & " " & reader("PrimaryLast").ToString()
                dateReceived.Text = reader("dateReceived").ToString()
                applicantName.Text = reader("applicant").ToString()
            End While
        Else
            div1.Visible = True
        End If
        reader.Close()
        sqlCmd2.Dispose()
        myConnection.Close()
    End Sub


modified 17-Jan-23 12:21pm.

SuggestionRe: Having problem showing just a section of a page. Pin
Richard Deeming16-Jan-23 22:11
mveRichard Deeming16-Jan-23 22:11 
GeneralRe: Having problem showing just a section of a page. Pin
samflex17-Jan-23 6:21
samflex17-Jan-23 6:21 
QuestionASP.NET core web api Pin
tixzre28-Dec-22 7:15
tixzre28-Dec-22 7:15 
AnswerRe: ASP.NET core web api Pin
tixzre29-Dec-22 5:41
tixzre29-Dec-22 5:41 
GeneralRe: ASP.NET core web api Pin
Richard Deeming5-Jan-23 0:28
mveRichard Deeming5-Jan-23 0:28 
QuestionStore Rich Text in DATA Base Pin
CARBER25-Nov-22 22:05
CARBER25-Nov-22 22:05 
AnswerRe: Store Rich Text in DATA Base Pin
RedDk26-Nov-22 9:08
RedDk26-Nov-22 9:08 
GeneralRe: Store Rich Text in DATA Base Pin
CARBER26-Nov-22 11:03
CARBER26-Nov-22 11:03 
AnswerRe: Store Rich Text in DATA Base Pin
Sam Hobbs26-Nov-22 12:22
Sam Hobbs26-Nov-22 12:22 
QuestionSuggestion on searching thru jobs and resumes Pin
Michael Clinton21-Oct-22 9:44
Michael Clinton21-Oct-22 9:44 
AnswerRe: Suggestion on searching thru jobs and resumes Pin
Richard MacCutchan21-Oct-22 21:43
mveRichard MacCutchan21-Oct-22 21:43 
AnswerRe: Suggestion on searching thru jobs and resumes Pin
rareprob solutions31-Oct-22 22:54
rareprob solutions31-Oct-22 22:54 
AnswerRe: Suggestion on searching thru jobs and resumes Pin
jsc4226-Nov-22 4:59
professionaljsc4226-Nov-22 4:59 
Question(SOLVED) Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
samflex19-Oct-22 8:11
samflex19-Oct-22 8:11 
AnswerRe: Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
Dave Kreskowiak19-Oct-22 12:26
mveDave Kreskowiak19-Oct-22 12:26 
GeneralRe: Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
samflex20-Oct-22 7:03
samflex20-Oct-22 7:03 
AnswerRe: (SOLVED) Error: The string was not recognized as a valid DateTime. There is an unknown word starting at index 0. Pin
Eddy Vluggen20-Oct-22 21:56
professionalEddy Vluggen20-Oct-22 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.