Forgot your password?
Sign in with
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Python questions
View Java questions
All Message Boards...
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Design and Architecture
Internet of Things
C / C++ / MFC
ATL / WTL / STL
Objective-C and Swift
Hardware & Devices
Hosting and Servers
.NET (Core and Framework)
Site Bugs / Suggestions
Spam and Abuse Watch
The Insider Newsletter
The Daily Build Newsletter
Most Valuable Professionals
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
What is 'CodeProject'?
Ask a Question
Bugs and Suggestions
Article Help Forum
Comments by Silvabolt (Top 40 by date)
lol, it amazes me how some people can't even properly ask a question.
Check out stackpanels, that will be your basic structure, and then add item controls in it with multiple children controls for the text/button, etc....
FYI, I got 15251 instead of 15982, so you must have changed your date. And this is correct. This represents the total number of days between the specified DateTimes
What type of object is "chart_"?
Sorry about that, glad you got it fixed!
You're right, updated the solution.
Precisely, and that's why that checkbox is there to control logic flow. All he has to do is lookup in whatever PDF api he is using to create the file normally without a password. I agree with you though, not the way to go because now there's potential for unprotected copies of the file that's supposed to be protected.
Step 1. Open visual studio.
What technology are you using? WinForm? ASP.NET? Anyways your dropdownlist doesn't have an ID, so service_id definitely won't get you any elements.
I think that's exactly what he wants. He wants the admin to be able to generate and download the file without any post download security.
The error is exactly what it says, you don't have that XAML page on your dev environment.
What Sergey said, if it's a local DB, then you're stuck. If it's on the network, you just need to copy the winform exe onto both users' computer.
Why do you need to generate an entire HTML page just to display data back to the user? You just need to do as you've already done and tell them 'Thanks for submitting your feedback'.
If you still see a requirement for this, then to be honest, you're doing it wrong. You don't want to have users creating new html pages every time they submit a form. Then you have users creating random pages on your server and they don't even know it! What you want to do is set up label controls with autopostback set to true. Once you have saved data, set the label text values to the saved data. That's all you really need to do. No pages, no hassle, no html generation.
What would this "instant display" form show to the user? If you are saving a feedback form, there's nothing much to show to the user except maybe (as you have done) an alert message 'Thanks for your feedback!'.
If you still want to have the saved data show up on some page after the user has submitted, then to be very honest, you're doing wrong. No one generates HTML pages on the fly, and even if you did, it would have to be saved on the server, and then users would have the ability to keep creating files on your server, all just to display data back to them.
What you should try to do is make a whole bunch of labels on the page with autopostback set to true. Then in codebehind after you've saved the form data, you can update their Label.Text values.
Make sure you're using GroupTemplate
Reason for my vote of 5 \n Very helpful for viewing databases at a glance.
I see what you mean now. I guess short answer is you're right, you can't do that because Include() eager loads everything of the specified property.
Long answer is you can get around it by doing post filtering, i.e., perform filtering on "ListParents" after you grab the data.
This guy had the same issue as you, notice that the selected answer doesn't even use include:
It should point you in the right direction, although it will be a bit more intricate for you because your NavProp property is a collection itself.
Who knows? Post more info if you want people to help.
Sorry man, I misunderstood, but I think my updated answer should work. Try it out :)
Note: What you are trying to do does not work because NavProp isn't an IEnumerable type, meaning you cannot attach a linq Where clause to the NavProp property itself. My current answer will grab you the parent objects that contain NavProp, that have their NavProp.Id equal to someId.
Sorry I misread the question. See if this works!
You can add more information by editing your question. Don't open another question just because you aren't getting answers.
And what is a lorry car?
Check to see if your config is right, deployment usually entails changing your keys so maybe you did something wrong there. Can you provide us with SCRIPT_TEMPLATE?
I have a feeling you are not getting all your tables updated because your program runs on a single thread. Every time it's busy updating from one sensor, it will miss the hardware response from the other sensors. Solution off the top of my head is to use multithreading, or to wait for sets of responses from all three sensors instead of one at a time.
You have got to provide more information, how do you expect us to know which info you store in what tables?
Might want to look up entity framework. Basically it creates an entity model representation of your data tables, and it generates basic CRUD operation queries for you so you don't have to make too many custom queries. But like ryan said, it depends on many things on what is the "best" way.
This might sound silly, but did you make sure to enable auto postback for the label "lbldes" as well? I think you will need that.
Hi Hoyice, try this, it uses something known as Entity Framework:
You can also google SQL Data client and manually grab your data from DB, but I'd try other methods first.
Also no need to steal someone's answer and pretend it's your own.
You have to change your format type to a string and not a datetime.
e.g string dateString = date.ToString("d");
No problem! I forgot you were using VB.Net, but I really couldn't find any good VB.NET tutorial for that class. You can always refer to MSDN:
I think in this case, you can probably search up some graphics software that can make GIFs (there are tons) and then set up a standard procedure to follow in order to make all your paths look and feel the same. Or if anything, have one person on your team be in charge of all the graphics related stuff. I would try to stay away from making inconsistent features.
That's fine I think. The only issue I could see with this is that your images are all static and pre-drawn, which could be a good thing and a bad thing. Good because you separate your graphic work from the coding, and bad because it's probably harder to manage.
For example, if you were to have different sized kiosks with different screen sizes, or if you were to open your wpf app on something else it was designed for, your map and path images might go out of the screen. In other words, it's not scaled for the screen size. You can programmatically resize the image I suppose, but with saved images, resizing will most likely decrease your image presentation quality and it isn't easy detecting screen size reliably.
Furthermore, you might have to think about the future, because every addition of a new attraction will require you to make a whole new gif image for the paths. What if you want to start drawing paths between establishments for multiple destinations? Hope oyu see what I mean, but if there won't be new establishments, then you don't have to worry about it.
One alternative is to use System.Drawing class, with this the lines you draw with it are vectorized and are drawn on runtime. Save your establishments and intersections as relative percentages of x and y from the left corner position of your map image, and then you only need to draw lines on all the paths that you are going to use. By doing this you can reuse the lines if some paths overlap (more managable I think) and even if you use the app elsewhere, it will still be visually the same. Make the lines visible only when they are part of the path from the kiosk to the establishment, and then hide them when they aren't relevant. The downside of this is of course is getting used to the drawing class. It's simple, but to draw things nicely, may take a while to get used to.
Here's a link to get you started if you go down this approach.
Both ways are fine and there may be other solutions, but it really comes down to your requirements. Good luck!
It depends on how you want to animate it, just make the path pop up suddenly, make it fade in, make it slowly draw it out from A to B, etc... and I'm actually not sure what the best way to implement a map is. Don't use flash, but do try exploring other options. In VB.net, you can try to use the System.Drawing class to draw stuff like lines and circles as intersection points.
well, first thing is design your WPF app first. This involves primarily two things, designing the map itself (how you're gonna implement it in software), and then the web interface (making the WPF buttons, grids, labels all work).
Worry about everything afterwards, because for starters, you just want to show a list of establishments and a map, be able to click on it, and then have a label control show up. That will be the base of your application, and then you can start adding features like mapping a path out, making it look professional and perhaps adding other useful features.
By the way, if you are mainly just showing which direction the tourist has to go, there isn't really any need for latitude and longitudes, you just need to highlight a path on the map, and save the distance from predetermined info (getting the distance from google maps for example).
Here is a tutorial I found on bing maps, it uses some thing called WebMatrix to make a website, but the main thing is that you can get a quick glimpse of what you can do with it from the tutorial.
Not sure about using Google Maps, because I'm pretty sure it isn't built for .net, though there are some 3rd party api extensions for it.
Keep in mind that the traveler can't just walk in a single line between the kiosk to the establishment. Since you're in .net domain, your probably gonna wanna try out bing maps. Using the api you will have the maps, ability to put markers on the maps (which will be your highlighting feature), the map will be scaled already, there would be automatic path generation for shortest path between the kiosk to the establishment, and a lot of the dirty work will be done.
If you have your own custom map that you want to use, that's probably gonna be a lot more work. In brief, you will need to place your map on the page with another section (dividing the screen) that lists establishments, every time a user clicks on the establishment, retrieve lat and long coordinates, and identify it on the map, trigger a response on the map by making say a label popup, and then you can draw a line objects to map out a path to follow. You'd need to do some kind of scaling to make sure the latitude and longitudes on your map are accurate and you would also need to figure out the algorithms for shortest paths.
In both cases, your SQL server needs to store the lat and long coordinates of the establishments and the kiosk itself. If you are doing your own map, you would probably need to store all the intersections between your establishments and kiosk as well.
I think it would be something like this, I've never actually worked with any map api directly so I'm not sure if I missed something.
This would only show one error at a time. Rather than doing this, you can check all fields at once, save them and notify user all of the errors at once. Furthermore, string.Empty should be used instead of "". Also, all of the solutions including these ones will break if textbox happens to be null. Solution 3 makes a good remark about the 'return', because this is probably handled in an event handler method. I know this is old, but none of these solutions are really complete.
Hmmm, very well written question by the way, and I think you know more silverlight than I do, but it could be this. The binding property only updates every time the textbox loses focus because that's how it knows when all textbox changes and actions on it are complete.
So when you first type 'John', you haven't lost focus yet and you are probably checking the SearchText value somewhere in your GetPersonsCommand while the binding hasn't updated yet. After your command finishes, you may have done something to put focus on another control, so the binding finally updates to 'John'. Then when you type 'John Doe', it once again doesn't pick the change up until after your command finishes, but in the middle of your command, you will see the current value of 'John'. Hence the "delayed" updates. Try putting a debug point in the SearchText Property setter itself and see when it updates.
Reason for my vote of 5 \n At first I thought you made a spelling mistake on "Devide", and then I realized you did it to differentiate the test method and the actual method. Awesome and clear, thanks.
What 'aspnet -i' said, response redirect is the way to go, and yes, put code, there's almost no way we can pinpoint your problem based on what you've given us.
Hi Naven Kumar,
It seems the problem is not your code, but Microsoft IE 10 itself. The postback operation fails in IE 10 when you have an image button inside a update panel. You need to update your .NET 4.0 framework with this patch (refer to Issue 2):
Last Updated 1 Jan 1900
All Rights Reserved.