|
Hi,
There might be someone here who knows Kendo UI controls, but I believe you stand a better chance on getting answers by posting it to dedicated forums: Kendo UI Forums - Telerik Community[^]
|
|
|
|
|
Help me read value in note <Code>, <Message>, <Time>
string result = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>
<string xmlns=\"http://tempuri.org/\">
<AAA>
<Code>5</Code>
<Message>Send MT Error!.</Message>
<Time></Time>
</AAA>
</string>"
XmlReader xReader = XmlReader.Create(new StringReader(result));
while (xReader.Read())
{
??????????????
}
Thanks so much!
modified 26-Aug-17 0:26am.
|
|
|
|
|
|
I have a yes/no toggle input switch below:
<input class="checked-switch" id="lookup" name="lookup" type="checkbox"/>
and I'm not sure what value to put for it when insert that value into a sql table. Here is my insert statement:
sql = "INSERT INTO CONTRACTOR (CAGE_CODE_EXIST,_ADDRESS1, PRIME_CONTRACTOR_ADDRESS2, CONTRACTOR_CITY, CONTRACTOR_STATE, CONTRACTOR_POSTAL_CODE) " +
"VALUES ('" + lookup.Checked. + "', '" + addr1.Text + "','" + addr2.Text + "', '" + city.Text + "','" + state.Text + "','" + postalcode.Text + "');";
the lookup.Checked doesn't seem to work so what can I put in for the toggle switch?
|
|
|
|
|
|
|
Everything you wanted to know about SQL injection (but were afraid to ask) | Troy Hunt[^]
How can I explain SQL injection without technical jargon? | Information Security Stack Exchange[^]
Query Parameterization Cheat Sheet | OWASP[^]
const string sql = "INSERT INTO CONTRACTOR (CAGE_CODE_EXIST, PRIME_CONTRACTOR_ADDRESS1, PRIME_CONTRACTOR_ADDRESS2, CONTRACTOR_CITY, CONTRACTOR_STATE, CONTRACTOR_POSTAL_CODE)"
+ " VALUES (@CAGE_CODE_EXIST, @PRIME_CONTRACTOR_ADDRESS1, @PRIME_CONTRACTOR_ADDRESS2, @CONTRACTOR_CITY, @CONTRACTOR_STATE, @CONTRACTOR_POSTAL_CODE)";
string connectionString = WebConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
using (var connection = new SqlConnection(connectionString))
using (var command = new SqlCommand(sql, connection))
{
command.Parameters.AddWithValue("@CAGE_CODE_EXIST", lookup.Checked);
command.Parameters.AddWithValue("@PRIME_CONTRACTOR_ADDRESS1", addr1.Text);
command.Parameters.AddWithValue("@PRIME_CONTRACTOR_ADDRESS2", addr2.Text);
command.Parameters.AddWithValue("@CONTRACTOR_CITY", city.Text);
command.Parameters.AddWithValue("@CONTRACTOR_STATE", state.Text);
command.Parameters.AddWithValue("@CONTRACTOR_POSTAL_CODE", postalcode.Text);
connection.Open();
command.ExecuteNonQuery();
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Just store whatever value it is. It's just a checkbox right? So you can store "checked" and "unchecked." You could store 1 and 0 or true and false. Whatever you want.
And fix the sql injection issues too.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Any ideas on asp.net project... Its my final year and i am really confused...
|
|
|
|
|
There are many ideas that you can use to get a subject for your final year project. In ASP.NET, you can select to create a Web API solution to provide solutions to cross-platform devices, Android, Windows Phone and other similar devices. You can also show your teachers how you managed the HTTP communication, in which data-interchange language (XML or JSON) and other similar stuff.
But final steps are onto you, you have to build the project and that is why you should consider your own final year project based on your own skill sets so that you can present the projects too.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Then why not choose something that you are not confused about? But if you are determined to use ASP.NET then go to https://www.asp.net/[^] where you will find lots of help.
|
|
|
|
|
It will depend on what your requirements are and what your skill level is at.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
A pub quiz site that can be hosted on a local server and interface to mobile devices for the teams.
The software will deliver multi-choice questions.
You could throw in added features like difficulty scores and the options provided in Who Wants to Be a Millionaire. Timed questions. Keeping track of questions already presented to teams or individuals.
Consider administrative functions like adding or uploading more questions. League tables for teams and individuals, or a knockout tournament.
For even more challenge throw in pictures, video, audio or interactive content. The questions themselves might be mini-games or puzzles, such as code breaking or solving a Sudoku grid.
It's your call how much of the above you include. If you collaborate, make sure you document the over all design and the interfaces between you and your team mates work BEFORE you all go off and cut code. In the real world you'd whiteboard and discuss designs within a team and then someone would document.
|
|
|
|
|
I have three textboxes in one row. When I adjust my browser window width to make it smaller it puts the three textboxes that were in one row into one column for each text box.
So for example, it looks like this before the browser width adjustment:
Textbox 1 Textbox 2 Textbox3
After the browser width adjustment to make the window smaller:
Textbox 1
Textbox 2
Textbox 3
Is there a setting on an web form that prevents this from happening.
|
|
|
|
|
Bootzilla33 wrote: Is there a setting on an web form that prevents this from happening.
No. You'll have to use CSS to style your textboxes.
How you do that will depend on your markup, what you want to happen, and which browsers you need to support. For example, you could use Flexbox[^], but that doesn't work in IE 10 or earlier[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Searching on the web I found differents solutions to log all requests received by a IIS server.
I read all articles about these differents solutions and I already implemented and tested them. I don't know wich one to choose between solution 1 and solution 2. Is there an history or performance or architecture maintenance reason that explain a solution is better than another. Are DelegatingHandler and/or ActionFilterAttribute a old feature?
B413
|
|
|
|
|
If you want to log every request, then use the IIS log. That will include requests which might not be mapped to the Web API pipeline, and therefore wouldn't be picked up by a DelegatingHandler or action filter.
If you just want to log the Web API requests, then either a DelegatingHandler or an action filter will work. Neither is an "old" feature. However, if you want to log the request and response bodies as a single entry, the DelegatingHandler would be the better choice.
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var response = await base.SendAsync(request, cancellationToken);
await LogAsync(request, response);
return response;
}
If you just want trace logs for your code, have a look at Tracing in ASP.NET Web API 2[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Hey, guys.
I am an experienced programmer but very new to ASP.NET. I am needing to code a simple web app and unsure of the best way to do it. I know how to find most answers on my own, so I won't be a needy person here. I just need to know the general design I should follow.
The web app is for a company that needs employees to enter data into a time log excel spreadsheet. My design simplifies the process using a step-by-step method that prompts for each item (i.e. start time, activity type). As the user inputs data, the answers are fed into the excel spd using COM (don't need any help there).
An example of the process:
1. Select your name (from DDL - I plan to automate this by login)
2. Enter your hours
3. etc.
The data inputted is contextual. In other words, what is prompted for in #4 can be dependent upon #1. This means the Server must keep up with all the information until the entry is complete.
Sorry if this is TMI. The short of it is, how do I display each step? Should they all be separate web pages? My gut says that's a bad idea. Is there a way to stay on one page and enter all this data one at a time? Currently I'm working with a Windows Forms ASP.NET web project.
Bonus points: The windows app I coded is smart enough to dynamically create the prompts, and it would be *amazing* if the web app could do the same.
|
|
|
|
|
If I had to do this project, I would use a grid control to have the user enter their time, then when all of the time is validated you could save it to the database.
Do yourself a favor and consider buying a set of controls to help you implement ASP.NET projects. I would strongly consider: Developer Express .NET UI Controls for Developers of Mobile, Desktop, Web & Reporting Applications | www.DevExpress.com[^]
I've been using their controls for years and met some of the guys personally. Great company.
You really want to look at their Grid Control, amazing.
That's my 2 cents, I'm getting off my soapbox now ... 
|
|
|
|
|
Thank you! I certainly will check out grid control -- sounds great!
|
|
|
|
|
There's 2 ways to do this: on the server or on the client. The approach depends largely on which particular ASP.NET framework you're using (MVC or webforms) and how comfortable you are with JavaScript.
From a UI standpoint you can generally do with a web app the things that you can do with a native one as long as you consider the limitations of the sandbox (you won't be hooking graphics hardware directly, etc). I've found that for enterprise applications that doens't matter much.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Thank you! I'm using WebForms and far more comfortable with C# than with JavaScript. As much as I can I'm keeping the code server-side and using C#.
|
|
|
|
|
Check out the Wizard control. I've used it to do exactly what you are talking about.
"Go forth into the source" - Neal Morse
|
|
|
|
|
This is right on the money! Thank you so much 
|
|
|
|