|
Interesting, as a desktop developer I have always attempted to reduce the number of calls to the database, caching static tables in memory on the local machine. I was looking for a similar capability in the web development arena.
I will have no compunction reloading from the database in future, it will reduce some of the gymnastics I used to perform about current lists!
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I have a page in asp.net that queries an XML file and shows the data. It shows the data I need in the nodes, but I want to print the specific values deeper in the node… for instance I want to be able to print the value - PARIS or country France in the XML example below. with the line below I can only print the first element but I am not sure how to print the other values,Any advise on how this can be achieved?
Note the rest of the code works and shows the other elements in the upper nodes, It s just I want to know how to display the name values or specific name value in the sample xml file below
Asp.net Line Code:
CityValue = node.SelectSingleNode("ns2:fields/ns2:field", nsManager).InnerText, _
XML:
<ns2:fields>
<ns2:field name="currency">EUR</ns2:field>
<ns2:field name="starRating">3 Star</ns2:field>
<ns2:field name="Country">FRANCE</ns2:field>
<ns2:field name="longitude">2.344952</ns2:field>
<ns2:field name="latitude">48.872646</ns2:field>
<ns2:field name="hotelID">6950</ns2:field>
<ns2:field name="city">PARIS</ns2:field>
<ns2:field name="zipcode">75009</ns2:field>
</ns2:fields>
|
|
|
|
|
|
It s not a namespace issue. Everything works as far a namespace is concerned. I want to know how to drill to the name Attribute and get the values displayed. for instance,
City or Zipcode values
|
|
|
|
|
Try:
CityValue = node.SelectSingleNode("ns2:fields/ns2:field[@name='city']", nsManager).InnerText
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks Richard. That's exactly what I was looking for 
|
|
|
|
|
<xs:element name="note">
<xs:complextype>
<xs:sequence>
<xs:element name="to" type="xs:string">
<xs:element name="from" type="xs:string">
<xs:element name="heading" type="xs:string">
<xs:element name="body" type="xs:string">
|
|
|
|
|
When I Rebuild the error below, how to fix and fix errors ?
Warning 1 The type 'webapp4U.UI.Controls.Controls_MenuLeft' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_2oy154p1.0.cs' conflicts with the imported type 'webapp4U.UI.Controls.Controls_MenuLeft' in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_kgvuexfr.dll'. Using the type defined in 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_2oy154p1.0.cs'. c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\website2010\e7f1df91\85da5ad5\App_Web_2oy154p1.0.cs
|
|
|
|
|
The message is self explanatory; you have two versions of the Controls_MenuLeft class, and the system has to decide which one to choose, which may not be what you want.
|
|
|
|
|
My problem is how do you solve this problem ?
|
|
|
|
|
Remove the duplicate class from your project.
|
|
|
|
|
It's not duplicate class from your project. It's only one
|
|
|
|
|
It is not my project. And there is a definite duplicate as shown in the error messages, so you need to find out why, and remove one of them.
|
|
|
|
|
I will send the sample to you to see, see the attached file WebSite2010
|
|
|
|
|
Running D:/WUSL/4th yr 1st sem/Traffic-Counting-Using-OpenCV-and-Python-Backed-by-Firebase-master/main code.py
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Edu 2018.1.3\helpers\pydev\pydev_run_in_console.py", line 52, in run_file
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm Edu 2018.1.3\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/WUSL/4th yr 1st sem/Traffic-Counting-Using-OpenCV-and-Python-Backed-by-Firebase-master/main code.py", line 10, in <module>
import requests
File "C:\Program Files\JetBrains\PyCharm Edu 2018.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 19, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'requests'
PyDev console: starting.
|
|
|
|
|
Python is nothing to do with ASP.NET - try the Web Development[^] forum instead.
But you're going to need to provide a lot more information than you have here if you want anyone to be able to help you.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
thilipr wrote: ModuleNotFoundError: No module named 'requests'
Go back to your source code to see why you are trying to import an unknown module.
|
|
|
|
|
Is there some magic I am missing with the select list tag helper
<div style="margin-top:15px;">
<label asp-for="SelectedUserDetails.ModifiedBy" style="font-weight:bold;"></label>
<input type='text' class='form-control' asp-for="SelectedUserDetails.ModifiedBy" />
</div>
<div style="margin-top:15px;">
<label asp-for="SelectedUserDetails.Operator" style="font-weight:bold;"></label>
<select asp-for="SelectedUserDetails.OperatorID" asp-items="Model.OperatorList"></select>
</div>
The first block places the input field BELOW the label. However the second block containing the Select tag helper places the drop down directly directly AFTER the label.
What should I add to get the drop down onto the line below the label?
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Needed to add Form-control to the drop down.
It does annoy me when I spot the solution 30 seconds AFTER I post the question
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
I have deployed my web application in IIS today but when I am opening my application with
http://mphidbonline.in/MPHIDBLogin.aspx URL
it is working fine but it is showing
http://mphidbonline.in/(S(hu13w42xoom2xkioqsmr4mv1))/MPHIDBLogin.aspx In URL with extra
path
(S(hu13w42xoom2xkioqsmr4mv1)) could you please give me a suggestion where I am doing mistake.
|
|
|
|
|
|
|
Please help me error when bind data to html datatable, i don't know what's wrong in my code, thx before..
Vb Code
<pre><System.Web.Services.WebMethod()>
Public Shared Function GetListPriority()
Dim client As New HttpClient()
Dim Resp = client.GetAsync(New Uri(ConfigurationManager.AppSettings("WS") + "ListPriority"))
Dim ds = JsonConvert.DeserializeObject(Of List(Of ListPriority))(Resp.Result.Content.ReadAsStringAsync().Result)
Dim details As New List(Of ListPriority)()
For Each i In ds
Dim oListPriority As New ListPriority
oListPriority.PriorityCode = i.PriorityCode
oListPriority.bAktif = i.bAktif
oListPriority.InputBy = i.InputBy
oListPriority.InputDate = i.InputDate
details.Add(oListPriority)
Next
Return details.ToArray
End Function
Public Class ListPriority
Public Property PriorityCode As String
Public Property bAktif As String
Public Property InputBy As String
Public Property InputDate As String
End Class
ASPX
<asp:Content ID="Content" ContentPlaceHolderID="MainContent" runat="server">
<div id="content-wrapper">
<div class="card mb-3">
<div class="card-header">
/ Master / Priority
<div style="float: right">
<button type="button" class="btn btn-info btn-sm" data-toggle="modal" data-target="#myModal">NEW</button>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead>
<tr>
<th>Priority Code</th>
<th>bAktif</th>
<th>Input By</th>
<th>Input Date</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Priority Code</th>
<th>bAktif</th>
<th>Input By</th>
<th>Input date</th>
</tr>
</tfoot>
<tbody>
</tbody>
</table>
</div>
</div>
<div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div>
</div>
</div>
</asp:Content>
JavaScript
<script src="../vendor/jquery/jquery.min.js"></script>
<script src="../Scripts/demo/datatables-demo.js"></script>
<script src="../vendor/datatables/jquery.dataTables.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "Priority.aspx/GetListPriority",
data: "{}",
dataType: "json",
success: function (data) {
var trHTML = '';
for (var i = 0; i < data.d.length; i++) {
trHTML += '<tr><td>' + data.d[i].PriorityCode + '</td><td>' + data.d[i].bAktif + '</td><td>' + data.d[i].InputBy + '</td><td>' + data.d[i].InputDate + '</td></tr>';
;
};$('#dataTable tbody').append(trHTML)},
error: function(result) {
alert("Error");
}
});
});
</script>
And show like this :
Image
|
|
|
|
|
I don't know what's wrong either because I don't see where you posted the actual error message.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
You're referencing the DataTables.net[^] library, so why are you building the table by hand? That library can automatically load the table data for you from an AJAX request:
DataTables example - Ajax data source (objects)[^]
Also, check the content of your datatables-demo.js file; there's nothing in the code you've shown which would display that message.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|