|
Sounds like you've got the same web.config file in the root and the subfolder.
You'll probably need to <remove /> the handlers, modules, and anything else that's duplicated before you can <add /> them again.
<remove name="Windows Login Handler" />
<add name="Windows Login Handler" path="Login" verb="POST" type="IMS.Web.WindowsLoginHandler" preCondition="integratedMode" />
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Should I put these things in my applications Web Config or in a different place?
|
|
|
|
|
Yes, in the application's web.config file.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you Richard, under which section of web config should I put it my friend?
Just a Note: And thanks a lot Richard, it is going to be very help since the URL of my local machine and URL on the Server aren't matching, as we are planning to go for the automatic deployments I need to set the URL so that it will not break things because of the URL issues - thanks a lot my friend.
modified 11-Mar-20 19:40pm.
|
|
|
|
|
Somewhere around line 73, in the system.webServer/handlers section.
As I said, you might need to do the same for the system.webServer/modules section, and there may be other duplicated elements you need to deal with as well.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Hi, I've been working on a web portal using ASP.NET Core 3.1 and I keep running into weird errors between Identity and EF Core. I've gone through several complete rebuilds and tons of errors and problems. when I build little web apps or separate Identity and EF Core then everything works just dandy. But when I try to bring them all together in a rather large production web app all of a sudden weird bugs crop up.
I've read that the Identity and EF Core teams work separately and sometimes there are problems between their releases...So I am wondering:
Is ASP.NET Core 3.1 not yet ready for prime time for building web apps?
Is there anyone here that is actually using it successfully in a production environment?
And if so, are there some tricks/suggestions for doing so?
Or should I use Core 2.2? Is that stable enough for production apps?
I know that this is a general question without going specifically into the bugs I've encountered. The bugs are many and variable and the code is too large to summarize here. If no one answers this then that will be my answer. If some people do answer but cannot confirm that they are using it in production then that will be my answer as well. And if some people tell me that I should not be using it right now that will be my answer as well.
In the other case, if people tell me that this is a known problem then perhaps they will be able to point out a workaround. Else I will have to abandon Identity and EF Core and build my own implementations directly. I've been thinking that I should have done this from the beginning, perhaps using Dapper instead of EF Core.
Thanks,
- Grant
|
|
|
|
|
.NET Core 2.2 reached "end of life" back in December:
.NET Core 2.2 will reach End of Life on December 23, 2019 | .NET Blog[^]
.NET Core official support policy[^]
The 2.x "long-term support" version is 2.1, which will be supported until August 2021. The other LTS version is 3.1, which will be supported until December 2021.
I've got a small custom CMS template which we use for creating basic sites for some of our customers, and for our own websites. It started life in 2.1, and the latest version is in 3.0; I haven't encountered any significant issues. It's using the Microsoft.AspNetCore.Identity.EntityFrameworkCore package, matching the version of the package to the version of .NET Core in the project.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I started with V2.0, and made it to V2.2 and still using it. I have no issues with V2.2 at all, everything works together and it's durable/reliable. I thought about moving up to V3+, but wanted to finish my project on a stable platform first before moving up.
But I don't use Identity and EF Core anymore, threw that out the window when I figured out that it's too complex to keep up with. It was more trouble than it was worth so I just went with Google SignIn with OAuth2 that I wrote on the side. I ended up writing code to support GMail and Signin part of the Google suite which was available as a NuGet package with little documentation.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
|
|
|
|
|
On a current project which is a large system that consists of multiple microservices, we use .net core 3.1 since Richard Deeming correctly mentioned that it has long term support by Microsoft unlike .net core 3.0. It worth mentioning though that we don't use Identity and rely on your in house authorization mechanism. There are no problems with EF Core though.
|
|
|
|
|
Hi,
could someone advise me what the best technology (SilverLight, etc.) I should use to create a "drawing layout" where I could to insert vector objects (see the link - individual dimensioned blocks, that is air handling unit from blocks) based on user input parameters and the possibility to edit them backwards (parameters, dimensions, ...), add dimensions, etc. ??
http://www.computair.co.uk/Content/images/wintadsprocess/2x3Image5.png[^]
Vectors must be used because I need to know the exact placement of blocks relative to each other, know the exact dimensions, etc. to use for further calculations, create drawings, export DXF files, etc.
In fact, it is a conversion of a desktop application to a web application.
I'd like to stay with ASP.NET and C #.
Thank you very much!
Mitch
|
|
|
|
|
Mitch, if you want to work with vectors in the modern web, you should look into using Scalable Vector Graphics (SVG). As SVG images are described as vectors, they can be described in code and can become surprisingly sophisticated[^] .
|
|
|
|
|
Pete, it seems that's exactly what I need. Thank you for directing... I will certainly buy your book!
By the way, do you think I could use ASP.NET web forms or I should/have to use the ASP.NET Core only?
Thank you.
|
|
|
|
|
You could use SVG with either but, to be honest, I'd recommend .NET Core everytime. The fact that I can host it on just about any platform I want, as well as the speed improvements are a compelling argument in its favour.
|
|
|
|
|
Greetings again,
Please forgive me for posting too much code. I am trying to post something that gives an idea of what I am struggling with.
Looking at the code, you can see there are 7 controls, GridView1, gvspouse, etc.
When the user queries the DB and there is say one row of data for say GridView1, the rest of the controls display one row of data. This is fine.
However, if the query returns two or more rows of data for one control, usually the rest of controls will show two or more empty rows of data.
This is not good.
We would like only the controls with two or more rows of data to return those rows and those controls that don't have any data to return just one row so user can fill that row if need be or leave it empty.
Is this possible?
Again, I apologize for too much code. My hope is that it helps convey the point I am trying to make when I say seven GridView controls.
Many thanks in advance
/HTML
<asp:UpdatePanel ID="PnlUsrDetails" runat="server">
<ContentTemplate>
<asp:MultiView ID="myMultiView" ActiveViewIndex="0" runat="server">
<asp:View ID="vwPersonalData" runat="server">
<!-- All user textboxes for input here -->
<span style="font-weight:bold;font-size:18px;color:#000000;">Name, title, and email address of employee filling this form</span><br /><br />
<div>
<div class="table-responsive">
<tablecccc>
<tr>
<td>
<div class="form-group">
<label id="lblEmpID">
<span style="font-weight: bold; font-size: 16px; color: #000000;">Enter your Employee Id to begin</span><span
style="color: #ff0000">*</span></label>
<asp:TextBox ID="txtEmpID" maxlength="10" placeholder="Badge ID..." Style="width: 150px;" class="form-control"
runat="server" AutoPostBack="true" OnTextChanged="txtEmpID_TextChanged"></asp:TextBox>
<br />
</div>
</td>
<td>
<div class="bd-callout bd-callout-danger" id="dprocessed" style="width:90%;" runat="server" visible="false">
<div id="checkusername" runat="server" visible="false" style="white-space:nowrap">
<asp:Label ID="lblStatus" runat="server"></asp:Label>
<asp:Image ID="imgstatus" runat="server" Width="17px" Height="17px" />
</div>
</div>
<div class="waitingdiv" id="loadingdiv" style="display:none;margin-left:5.3em">
<img src="images/ajax-loader.gif" alt="Loading" />Please wait...
</div>
</td>
</tr>
</tablecccc>
</div>
<div class="bd-callout bd-callout-danger" style="width:70%;">
<span style="color:#0093B2;font-weight:bold;font-size:1em;"> If you do not have an Employee ID, use the First Initial of first name + first initial of Last Name + date of birth in the format of MMDDYYYY. (For example, John Doe born January 1, 1900 will be, JD01011900)</span></div><br /><br />
<div class="table-responsive">
<table class="table">
<tr>
<td>
<div class="form-group">
<label for="lblEname"><span style="font-weight:bold;font-size:16px;color:#000000;">Employee Name</span><span style="color:#ff0000">*</span></label>
<asp:TextBox ID="txteName" placeholder="Employee name..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator2" Font-Bold="true"
SetFocusOnError="true" runat="server"
ErrorMessage="*" ControlToValidate="txteName" /><br />
</div>
</td>
<td>
<div class="form-group">
<label id="lblTitle"><span style="font-weight:bold;font-size:16px;color:#000000;">Your title</span><span style="color:#ff0000">*</span></label>
<asp:TextBox ID="txttitle" placeholder="Employee title..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator3" Font-Bold="true"
SetFocusOnError="true" runat="server"
ErrorMessage="*" ControlToValidate="txttitle" />
</div>
</td>
<td>
<div class="form-group">
<label id="lblEmail"><span style="font-weight:bold;font-size:16px;color:#000000;">Your email address</span><span style="color:#ff0000">*</span></label>
<asp:TextBox ID="txtemail" placeholder="Employee email..." style="width:200px;" class="form-control" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator id="RequiredFieldValidator4" Font-Bold="true"
SetFocusOnError="true" runat="server"
ErrorMessage="*" ControlToValidate="txtemail" />
</div>
</td>
</tr>
</table>
</div>
<br /><br />
<div id="mainContainer" class="container">
<div class="shadowBox">
<div class="page-container">
<div class="container">
<div class="row">
<div class="col-lg-12 ">
<div class="table-responsive" data-pattern="priority-columns">
<span style="font-weight:bold;font-size:18px;color:#000000;">1. Name and address of Income Sources of $1,000.00 or greater of Employee (excluding income received from the organization):</span><br /><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="Gridview1" RowStyle-Wrap="false" gridlines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" onrowdatabound="Gridview1_RowDataBound" OnRowDeleting="Gridview1_RowDeleting">
<Columns>
<asp:BoundField DataField="RowNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtsourcename" Text='<%# Eval("sourcename") %>' placeholder="Name...(e.g, Jane Doe)" runat="server" style="width:375px;" AutoPostBack="true" class="form-control textClass" OnTextChanged="txtsourcename_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="grid1Details" ClientIDMode="Static" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="Grid1CheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtsourceaddress" Text='<%# Eval("sourceaddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control textClass"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="ButtonAdd" runat="server" Text="Add another row if needed"
onclick="ButtonAdd_Click" CssClass="grvAddButton" /><br /><br /><br>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="sourceDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
<span style="font-weight:bold;font-size:18px;color:#000000;">2. Name and address of Income Sources of $1,000.00 greater of Spouse, if any:</span>
<button type="button" class="btn btn-info" data-toggle="popover" title="Definition of Spouse" data-trigger="focus" data-content="For purposes of this ordinance, the term spouse includes a domestic partner as the Code of organization defines that term."></button><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="grvspouse" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" onrowdatabound="grvspouse_RowDataBound" OnRowDeleting="grvspouse_RowDeleting">
<Columns>
<asp:BoundField DataField="SpouseNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtspousename" Text='<%# Eval("spousename") %>' placeholder="Name...(e.g, Jane Doe)" runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtspousename_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="spouseDetails" ClientIDMode="Static" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="SpouseCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtspouseaddress" Text='<%# Eval("spouseaddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="ButtonAdd2" runat="server" Text="Add another row if needed"
onclick="ButtonAdd2_Click" CssClass="grvAddButton" /><br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="spouseDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
<span style="font-weight:bold;font-size:18px;color:#000000;">3. Name and address of sources of Interest or Dividends of $1,000 or greater of Employee and/or Spouse: </span><br /><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="grvDiv" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvDiv_RowDeleting">
<Columns>
<asp:BoundField DataField="DivsNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtdividentname" Text='<%# Eval("dividentName") %>' placeholder="Name of income or divident source..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtdividentname_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="divDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="divCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtdividentaddress" Text='<%# Eval("dividentAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="ButtonAdd3" runat="server" Text="Add another row if needed"
onclick="ButtonAdd3_Click" CssClass="grvAddButton" /><br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="divDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
<span style="font-weight:bold;font-size:18px;color:#000000;">4. Name and address of sources of reimbursement of expenses of $1,000 or greater of Employee and/or Spouse: (excluding reimbursement of expenses by DeKalb County or reimbursement by any insurance program offered by DeKalb County):</span><br /><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="grvReim" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvReim_RowDeleting">
<Columns>
<asp:BoundField DataField="ReimNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtReimbursename" Text='<%# Eval("reimbursementName") %>' placeholder="Name of source of reimbursement..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtReimbursename_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="reimDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="ReimCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtReimburseaddress" Text='<%# Eval("reimbursementAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="ButtonAd4" runat="server" Text="Add another row if needed"
onclick="ButtonAdd4_Click" CssClass="grvAddButton" /><br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="reimnDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
<span style="font-weight:bold;font-size:18px;color:#000000;">5. Honoraria from a single source in the aggregate amount of $500.00 or greater: (No comma (,) or period(.), eg 500)</span>
<button type="button" class="btn btn-info" data-toggle="popover" title="Honoraria Definition" data-trigger="focus" data-content="A payment given to a professional person for services for which fees are not legally or traditionally required."></button><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="grvHon" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvHon_RowDeleting">
<Columns>
<asp:BoundField DataField="HonNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Honoraria">
<headerstyle horizontalAlign="Left" />
<ItemTemplate>
<asp:TextBox ID="txthonoraria" Text='<%# Eval("honoraria") %>' placeholder="Honoraria from a single source... eg 500" runat="server" style="width:250px;" class="form-control txtgiftincome" AutoPostBack="true" OnTextChanged="txthonoraria_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="honDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="HonCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txthonaddress" Text='<%# Eval("HonorariaAddress") %>' placeholder="Address..." runat="server" style="width:250px;" class="form-control"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Income">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txthonincome" Text='<%# Eval("HonorariaIncome") %>' placeholder="Income...(example: 500)" runat="server" style="width:250px;" class="form-control txtgiftincome numeric"></asp:TextBox>
<asp:CompareValidator ID="valQtyNumeric" runat="server" ControlToValidate="txthonincome" style="color:red;font-weight:bold;font-size:1.0em;" Display="Dynamic" SetFocusOnError="true"
Text="" ErrorMessage="Error: Amount must be digits only!" Operator="DataTypeCheck" Type="Integer">
</asp:CompareValidator><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="ButtonAdd5" runat="server" Text="Add another row if needed"
onclick="ButtonAdd5_Click" CssClass="grvAddButton" /><br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="HonDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
<span style="font-weight:bold;font-size:18px;color:#000000;">6. Name and address of the source of any gift /or gifts in the aggregate amount or value of $500 or greater from a single source: (excluding gifts from relatives unless the relative is doing business with the County):</span><br /><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="grvGift" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvGift_RowDeleting">
<Columns>
<asp:BoundField DataField="GiftNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtgiftname" Text='<%# Eval("giftName") %>' placeholder="Name of source of any gift..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtgiftname_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="giftDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="GiftCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtgiftaddress" Text='<%# Eval("giftAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="ButtonAdd6" runat="server" Text="Add another row if needed"
onclick="ButtonAdd6_Click" CssClass="grvAddButton" /><br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="giftDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
<span style="font-weight:bold;font-size:18px;color:#000000;">7. Name and address of any organization in which the employee or spouse is an officer, director, partner, proprietor or serves in any advisory capacity from which the income of $1,000.00 or greater was derived:</span><br /><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="grvOrg" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvOrg_RowDeleting">
<Columns>
<asp:BoundField DataField="OrgNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtorgname" Text='<%# Eval("orgName") %>' placeholder="Name of organization..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtorgname_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="orgDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="OrgCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtorgaddress" Text='<%# Eval("orgAddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="ButtonAdd7" runat="server" Text="Add another row if needed"
onclick="ButtonAdd7_Click" CssClass="grvAddButton" /><br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="orgDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
<span style="font-weight:bold;font-size:18px;color:#000000;">8. Name and address of each creditor to whom the employee or spouse was indebted for a period of 90 consecutive days or more in an amount of $7,500.00 or greater, excluding the purchase or sale of real property, retail installment debt, vehicle payments and student loans:</span><br /><br />
<table class="table">
<tr>
<td>
<asp:gridview ID="grvCred" RowStyle-Wrap="false" GridLines="None" CssClass="responsiveTable1" runat="server" ShowFooter="true" AutoGenerateColumns="false" OnRowDeleting="grvCred_RowDeleting">
<Columns>
<asp:BoundField DataField="CreditNumber" Visible="false" HeaderText="Row Number" />
<asp:TemplateField HeaderText="Name">
<headerstyle horizontalalign="Left" />
<ItemTemplate>
<asp:TextBox ID="txtcreditorname" Text='<%# Eval("creditorname") %>' placeholder="Name of creditor..." runat="server" style="width:375px;" class="form-control" AutoPostBack="true" OnTextChanged="txtcreditorname_TextChanged"></asp:TextBox><br />
<asp:CheckBox ID="credDetails" runat="server" Checked="false" AutoPostBack="true" OnCheckedChanged="CredCheckChanged" /><span style="color:#ff0000">*Check this box if N/A</span>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Address">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<ItemTemplate>
<asp:TextBox ID="txtcreditoraddress" Text='<%# Eval("creditoraddress") %>' placeholder="Address..." runat="server" style="width:375px;" class="form-control"></asp:TextBox><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="ButtonAdd8" runat="server" Text="Add another row if needed"
onclick="ButtonAdd8_Click" CssClass="grvAddButton" /><br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:Button ID="credDelete" runat="server" Text="Delete" CommandName="Delete"
CssClass="grvDelButton" OnClientClick="return confirm('Are you sure you want to remove this row?')" /> <br /><br /><br />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:gridview>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</asp:View>
</asp:MultiView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
</form>
Private Sub fillSourceRecords()
Dim control As Control = Nothing
Dim conn_str As String = ConfigurationManager.ConnectionStrings("ppmtest").ConnectionString
Using conn As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ppmtest").ConnectionString)
conn.Open()
Using sourcecmd As SqlCommand = New SqlCommand()
sourcecmd.CommandText = "uspGetEthicsRecs"
sourcecmd.CommandType = CommandType.StoredProcedure
sourcecmd.Parameters.AddWithValue("@empID", txtEmpID.Text.Trim())
sourcecmd.Connection = conn
Using ad As SqlDataAdapter = New SqlDataAdapter(sourcecmd)
Dim ds As DataTable = New DataTable()
ad.Fill(ds)
If ds.Rows.Count > 0 Then
Gridview1.DataSource = ds
Gridview1.DataBind()
grvspouse.DataSource = ds
grvspouse.DataBind()
grvDiv.DataSource = ds
grvDiv.DataBind()
grvReim.DataSource = ds
grvReim.DataBind()
grvHon.DataSource = ds
grvHon.DataBind()
grvGift.DataSource = ds
grvGift.DataBind()
grvOrg.DataSource = ds
grvOrg.DataBind()
grvCred.DataSource = ds
grvCred.DataBind()
Else
End If
End Using
End Using
End Using
End Sub
|
|
|
|
|
You need to remove all the unnecessary code from that post and explain exactly where the error occurs. Please don't just dump everything and leave it to us to try and figure out what you are referring to.
|
|
|
|
|
Thank you sir for your response but you didn't have to respond if the question makes no sense to you.
This is the way you have always responded to any post by anyone.
|
|
|
|
|
|
At a guess (I refuse to wade through your entire code block) you are binding all gridviews to the one collection, you probably need to create a collection for each gridview with only the relevant data in it.
Richards comment is perfectly valid.
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
No, his comment is not valid at all.
First of all, I explained the issue that I am having.
If I had done that and not show any code, he would have come back and ask for code.
Most of the code is HTML just to show the many gridview controls I am using and just one method on codebehind which in my view is the code that I believe needs modification.
I am still working on it on my way and if I can get it resolved, I will post it for Richard.
BTW, this is who he is. He is pretty good at yelling at posters but I have not seen any real solution he has provided to any questions here.
Sorry, I don't mean to be mean but I truly dislike when someone yells at you but does not have the ability to help solve your problem.
At least you attempted a solution. I can deal with criticisms if an attempt is made to help if the help doesn't solve your problem.
|
|
|
|
|
The ability to isolate an issue and strip off all which is not relevant is a skill.
A huge lot of unformatted code is just distracting; someone with no knowledge of your issue won't want to wade through all that code to try and find what is the problem and where it lies. Especially when the description of the problem does not immediately make sense.
So we need you to do this primary filtering job. This will allow us to provide better ideas towards resolution. Because, you know, we have lives and jobs, too.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
I have not yelled at anyone. I merely suggested that if you want help then you need to help us. You need to understand that we have never seen your code before so have no idea of the thinking or the logic behind it. We rely on you, the poster, to explain in simple terms what the issue is and where it occurs. Without that information we are floundering in the dark.
|
|
|
|
|
Instead of binding all gridviews to one DataTable, bind each grid to a different dataView of the same DataTable:
e.g.
Gridview1.DataSource = New DataView(ds)
Gridview1.DataBind()
grvspouse.DataSource = New DataView(ds)
grvspouse.DataBind()
grvDiv.DataSource = New DataView(ds)
grvDiv.DataBind()
...
...
|
|
|
|
|
Hi Sir,
Need help, i noob in Asp.net. Using VB for my coding;
Situation :-
a) Using Master Page
b) Got 3 web Form ( Staff.aspx,student.aspx,external.aspx)
c) Every form have Search Textbox
In Staff.aspx, search Textbox working great when connecting to Oracle Database and appear the data holder in other textbox.
But when using Student.aspx or External.aspx, the Search Textbox will appear No Data / Cardholder , in database the data is exist.
the Sql query it ok when i direct include the User ID but when keep in in textbox cannot appear the data.
Plz guide me
Tq
|
|
|
|
|
kerek2 wrote: Plz guide me In what way? We have no idea what your code does or what the error is. Please edit your question and show some proper details of the problem.
|
|
|
|
|