15,886,110 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Thomas Nielsen - getCore (Top 160 by date)
Thomas Nielsen - getCore
6-Dec-17 10:31am
View
Yea that's right! startup.cs is the most common name for the 'application_start' class in .net core
Thomas Nielsen - getCore
5-Dec-17 3:12am
View
I updated the solution for general external controllers, in this case a web api 2 doesn't have a difference to .net core that i have found yet, beyond more stuff working off the bat. From your decription it is the same problem i encountered.
Thomas Nielsen - getCore
23-Nov-17 10:21am
View
Haven't read the details yet, but mostly when these things happen, means you're updating the ui too frequently or modify several things that cause layout to be invalidated and hence queued for repaint. You can improve this behaviour by using SuspendLayout/ResumeLayout when modifying object on screen and reducing FPS, number of updates per second. Human eye cannot easily see higher than 30 anyway, i guess you're doing more than that. And add a logging framework (log4net) and start dropping lines in to get an easy indication of frequency.
My best guess is that your client eats the cpu so there's little left for the other application or your move tries to paint for each pixel. Hope this helps as a direction at least.
Thomas Nielsen - getCore
23-Nov-17 9:55am
View
Does the table you're binding to have a primary key?
Please supply the datatable definition, it's most likely where your difference_of_trouble lies
Thomas Nielsen - getCore
23-Nov-17 9:52am
View
i'd recommend getting the data from the database and do your logics in c#, it's much easier than using tsql for that. You'll have to make a rather complex query if doing what you will, could that work for you?
Thomas Nielsen - getCore
9-Oct-17 7:47am
View
Please see updated suggestion
Thomas Nielsen - getCore
19-Sep-17 7:53am
View
You will not in fact be sending any request to the wsdl. WSDL is short for Web Service Definition Language, is is equivalent to an xml schema it just describes the operations the service is offering. The endpoint is typically same adress where you pulled the wsdl from just without part of the path
Thomas Nielsen - getCore
19-Sep-17 3:34am
View
self hosting is for development purpose, the only situation where that is not possible is if the service isn't your own :)
Anyway it looks like you successfully generate a proxy, the 'phone home' code. Now you have to focus on where is your endpoint and configuring that so that you can point your 'phone' at some number e.g. IP or other host identification and what port that is accepting you.
Very frequently you'll have to log in to get some sort of token which you can then use to query with. in your case it could look like you have to know what customer you're looking for first and your semantics don't appear valid i'd change what you wrote to
(any WHY oh why do you have a ServiceReference1 reference ?!! imo always give variables meaningfull names but that's a different story ;) )
using (var proxy = new WSDLCall.ServiceReference1.ServiceReference1Client()){
ServiceReference1.GetCustomerData custInfo = proxy.GetCustomerData();
//why doesn't call above take a parameter? doesn't make much sense without
}
Thomas Nielsen - getCore
4-Sep-17 6:07am
View
Recharging what?
Thomas Nielsen - getCore
1-Sep-17 10:55am
View
The response comes from somewhere, is that somewhere you can control?
If not you'll have to do what you can with what you get.. totally doable though ;)
Thomas Nielsen - getCore
1-Sep-17 2:59am
View
See originalgriff's explenation
Thomas Nielsen - getCore
1-Sep-17 2:57am
View
Are you running your visual studio in administrator mode? If not, give it a try
Thomas Nielsen - getCore
31-Aug-17 11:46am
View
Difficult to state where to start exactly, It would be a good idea to introduce the consept on an identifier or id, this way two participants with the same name is both possible and identifiable.
In your setup what you want to do is to store data in an ado.dataset and datatable and persist it in an xml document. But you do now want to display names if there are duplicates and logically not store them i'm sure.
But then why not use a List and a data class, and linq and say Json as it is less bloated compared to xml. So yea i'd recommend upgrading to newer techniques. this will qive you stuff like distinct for free.
Would you consider a completely different implementation to solve your problem?
Thomas Nielsen - getCore
31-Aug-17 10:44am
View
If you're using the sophix library, please include your actual implementation and show what gives you troubles, that anybody might realistically B-]
Thomas Nielsen - getCore
30-Aug-17 3:58am
View
I hope i might be of assitance, but without the actual html and code behind it's difficult to see where your bug is. First off Kerthik is right, there is no property called Text in the asp.net hiddenfield control so it could be something simple like that though: http://www.c-sharpcorner.com/article/hidden-field-in-asp-net/
Thomas Nielsen - getCore
28-Aug-17 3:08am
View
You have to include your code for anybody to help you inhere :)
Thomas Nielsen - getCore
28-Aug-17 3:03am
View
Much depends on your html in this case. what type is that HiddenField1? do include your html snip at least with the hidden field, it could be input type hidden or server side control?? Basically it's telling you that you're access an property by name on the dom object which it doesn't have.
Thomas Nielsen - getCore
28-Aug-17 2:40am
View
Well like a Bulgarian programmer friend phrased it: Greatness waits for those who try, none can teach you. it's all inside, just climb!
Thomas Nielsen - getCore
25-Aug-17 4:23am
View
yes BETWEEN is a fully legal TSQL statement. If you want accurate to the millisecond you could change the second par tof dates to '13/02/2016 07:59:59.999' but the difference is presumably academic, microsoft ref: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/between-transact-sql
Thomas Nielsen - getCore
25-Aug-17 3:23am
View
What kind of procedures? Do you men within C#, the so called methods of classes? or SQL stored procedures`? or RPC outside thread compartment like to another process or machine?
Thomas Nielsen - getCore
25-Aug-17 3:18am
View
Forgive me, it's a bit unclear. Are you asking about an SQL query or how to handle the return type from your admin module? Is it a list, if so please supply the definition of the type being returned, that we can help you with your linq or what not.
Thomas Nielsen - getCore
22-Aug-17 9:15am
View
What repository implementation are your using?
Thomas Nielsen - getCore
22-Aug-17 8:34am
View
see the updated example, i presume you'll want a protected page property holding info about how the menu should look different on the current page, but that's all you have to do server side imo, with a menu served by async client requests
Thomas Nielsen - getCore
22-Aug-17 5:50am
View
Oh if you're using ajax for the menu just drop the content placeholder all together as you don't need anything server side or simply return html with the div you're going to load the data into
Thomas Nielsen - getCore
22-Aug-17 4:41am
View
Deleted
isn't this approach very dependent on characters available? Different codepages will have different codes. For instance in DK we have ÆØÅ and other places too
Thomas Nielsen - getCore
21-Aug-17 7:45am
View
thx
Thomas Nielsen - getCore
21-Aug-17 7:34am
View
At least we're trying Richard, expressing oppinions is actually a decent part of communication that's a good thing B-]
You have a very valid point indeed and i hope anybody in doubt of recommendation for prod code will notice that the elaborate example does indeed use a parameterized query and properly use stored precedures for data changing queries and not commandtype.text for maintenance reasons etc.
I might even consider not making a quick TSQL query in the future to avoid having to invest such ressources in explaining what the main point is and what is wrapping, and risc missing the motivation of fine internet citicens attempting to push the upper bar up ;)
What i won't do is excuse the approach by altering the initial bits, as that was the way i chose to show the TQL insert query and i DID spend extra while to show what an actual solution might look like.
Thomas Nielsen - getCore
21-Aug-17 5:20am
View
Dear Sir, i was merely pointing out that the users question was 'how do i insert data into my table' explicitly. Considering injection is part of a solution architecture. Not what i was aiming for when answering the question from somebody struggeling with basic TSQL.
But perhaps i was being overly harsh at, I'm sure you're propably a good programmer and wasn't gaming for appearing smart by mocking somebody else and therefore are not a troll :)
Now the hiding in procedure, as you see by my extended example was referring to the obvious correct way of storing TSQL, on the SQL server. But when it is there, then that answer wouldn've answered how to do it as it would've been hidden, hence stated.
So to answer your accusing question that triggered me a bit 'why do you ... introduce a critical security vulnerability..'
My ambition was teaching TSQL, not giving a solution code sample for .net
Hope You feel sufficiently heard and cared about the oppinion of mr. Deeming, and at least as you see in the example provided to give a hint in the updated solution of what something moving towards production code will look like - why i stuck to just answer the question not to spend longer than neccesary to answer a query which was rather specific.
Thomas Nielsen - getCore
18-Aug-17 11:37am
View
So you see, perhaps after update, Richard Deeming, that providing even a sketchy actual solution was never in scope in the question or in the answer and implying it imo is just trolling peops, and you should stop doing that :) but then you're not likely to care what anybody else says or thinks, right ?!
Thomas Nielsen - getCore
18-Aug-17 9:36am
View
Oh that's your aim. yea maybe a bit sloppy. But the question was 'how to insert data into a table' which hiding in a procedure won't address. Furthermore you'll notice that there is no ui in my example, so it's safe to assume that any ui valiation will have occured already at the time of reaching that code :)
Thomas Nielsen - getCore
18-Aug-17 8:58am
View
Deleted
Hi Member 133... in that case you'll need to pad the numfatura as well, i'll update example
Thomas Nielsen - getCore
18-Aug-17 8:58am
View
Lol, it's not my code ;) i just copied the questions code and corrected the fault
Thomas Nielsen - getCore
17-Aug-17 9:34am
View
What error is that sorry? On the Sql connectionstring? or sql expression?? i believe i forgot an e as well in your table name, thought you'd put whatever you named it
Thomas Nielsen - getCore
17-Aug-17 9:21am
View
ok i'll make a revised one
Thomas Nielsen - getCore
17-Aug-17 9:20am
View
Deleted
The function doesn't exist untill you make it, it's my TODO for you if you do want to check your ui parameters
Thomas Nielsen - getCore
17-Aug-17 9:18am
View
Deleted
If yo choose to make that function make sure it returns a SqlConnection see for instance https://www.dotnetperls.com/sqlconnection
Thomas Nielsen - getCore
17-Aug-17 9:08am
View
:) it's not just copy paste friend. I'm implying you'll make a method CheckMyUiValues to prevent sql injection and GetOpenConnection To instantiate a connection and open it .... if you dont want to remove CheckMyUiValues method and assign directly and just new up an SqlConnection with your appropriate sql connection string ... just not something i'd write myself or incourage anybody to. Oh and string.Format should have a capital F.
Thomas Nielsen - getCore
17-Aug-17 9:00am
View
ok, please see updated suggestion
Thomas Nielsen - getCore
17-Aug-17 6:28am
View
Why would want to do that, don't you just want to make sure they're not hitting the service at the same time?
Thomas Nielsen - getCore
13-Aug-17 16:58pm
View
OMG Your naming dude! That's so no no not to using meaningfull names and we've got numbered methods and classes here. it's like my code reviewer eyes bleed!
Anyway, start with the microsoft threadstart delegate page and look at what you did different and then don't ;)
https://msdn.microsoft.com/en-us/library/system.threading.threadstart(v=vs.110).aspx
Thomas Nielsen - getCore
11-Aug-17 8:30am
View
A paged grid displays a resultset in pages ... why would you want to sort just one page independent of the sorting order? just curious
Thomas Nielsen - getCore
11-Aug-17 8:02am
View
Please post the ABC's do the adresses match op, the binding and the contract being exposted? does your iis enable those for transport?
Thomas Nielsen - getCore
7-Aug-17 2:52am
View
the name resolving takes the hosts file first, then the local DNS, if you control that you can also point it to your machine. Appears it does work as you write about the routing but not if you want to use session og cookies. Those factors don't have any effect of the DNS system so it's really strange. I suggest if the routing is not your problem (but statefull sites) you should update the question with more details of the actual solution
Thomas Nielsen - getCore
4-Aug-17 6:33am
View
Are you sure it's the rights question "how do i make my code work with many more files" ? or indeed is it an architectural problem using an ftp server connection to handle that many files? I presume the vast majority of the downloadable files have already been downloaded?? Many folder browsing situations become muddy with > 1000 files in, perhaps it's worth considering if you have to.
To solve it the way it is, i suppose David Wimbley is pointing to the right path.
Thomas Nielsen - getCore
4-Aug-17 5:43am
View
What is the question?
Thomas Nielsen - getCore
3-Aug-17 8:43am
View
Please try to rephrase what is it you want to do. You'll never get an answer if you're not much more specific. You are building a web browser? If not Which one are you using?? do you mean reload the source in your current active tab ???
Think it's the most empty question i remember having seen
Thomas Nielsen - getCore
3-Aug-17 8:29am
View
wouldn't it work to shell open acrobat reader for the viewing? that would be a very fast solution it will be hard to improve functionality of within a control, i dare imply the valueadding of that effort build a nice viewer seems to be very little or do you have constraints ??
Thomas Nielsen - getCore
1-Aug-17 6:16am
View
ok, well if you're using webapi in the first case, you're already running asyncronously to your website so there really is no reason to use background services or tasks within the actual method call, if that means that you'll loose your identity is there? And if you do you can pass the identity information as state.
How your actual code looks or a mockup of it is essential to anybody inhere being able to help properly :) *hint*
Thomas Nielsen - getCore
1-Aug-17 5:37am
View
But you have a call chain with authenticated identity accessing your first service?
First service does run with [Authorize] attribute??
Thomas Nielsen - getCore
1-Aug-17 4:14am
View
Doesn't it work simply to put [authorize] on the services and use a path for routing and let .net handle the rest? It's perfectly standard to define services in libraries and just merely instantiate them, doesn't relate to anything but the identity is authorized and it will be if the user is logged in who do you need to explicitly handle the situation of the login as it relates to services, doesn't your users have access to use the service?
Thomas Nielsen - getCore
28-Jun-17 4:18am
View
Well you cannot have a single action happenig both on server and client :)
the client renders the javascript in your browser and the server (runat='server') instance of the controls is happening between request/post and response
Thomas Nielsen - getCore
28-Jun-17 4:15am
View
don't put a panel in a panel as the updatepanels update on different situation, they should update their content, and that content shouldn't be other updatepanels.
You have to submit more code for the solution to be adviceable upon.
Thomas Nielsen - getCore
26-Jun-17 5:55am
View
You REALLY need to have a clue about designing relational database systems. I'd very much recommend you to look at some material on this subject you will have to be pretty adept in this if you're planning on a future in Software development.
https://www.pluralsight.com/courses/relational-database-design
https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/designing-relational-database-tables
Thomas Nielsen - getCore
23-Jun-17 3:36am
View
Oh, my bad. Thanks. Annoying that problems are not marked as resolved in relation to cruise altitude benevolent intent :)
Thomas Nielsen - getCore
20-Jun-17 10:24am
View
Sorry i was mistaken, was thinking of this one: https://msdn.microsoft.com/en-us/library/office/bb448854.aspx
But that doesn't support outlook/ exchange file formats apparently. Thought i remembered it from an email project.
Anyway with interop for instance like in this thread: https://stackoverflow.com/questions/90899/net-get-all-outlook-calendar-items
Thomas Nielsen - getCore
20-Jun-17 8:01am
View
That information is sensitive data, it is of cause protected against what you're trying to do. You can however read Exported calender and email details, for instance using OpenXml for a fast framework
Thomas Nielsen - getCore
20-Jun-17 7:50am
View
You did not read my response?
Ok if you want to do it, remember outlook is a desktop application, so you propably want to access the exchange server, which is where the mailbox is in effect.
Outlook is a part of office so you could use interop, it's not very fast, but it could provide what you need.
https://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.aspx
You cannot access classified information without running in a user context that has already logged in as that person, without using credentials for obvious reasons.
Thomas Nielsen - getCore
20-Jun-17 7:46am
View
For interacting with text files, for instance: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/file-system/how-to-write-to-a-text-file
plus if u want this one can read and write: https://github.com/JoshClose/CsvHelper
Thomas Nielsen - getCore
20-Jun-17 3:59am
View
You should never run a web application in a credentials context with access to outlook as you don't want your application to ...be...able..to...access...outlook/Exchange :)
instead let it communicate with a service which will more easily allow you to manage security and that service in turn can both close down security as to the requester, avoid having thus related leaving your locations network and get access to outlook cleany out of your web server :)
Thomas Nielsen - getCore
11-Jan-17 8:01am
View
If the side project runs and work sok with the databse already on your sqlexpress, means it's there. Then just use a regular connectionstring in your project and connect to the instance instead of that attach method :)
Thomas Nielsen - getCore
11-Jan-17 7:59am
View
Do You want to close the browser when somebody clicks something on your page?
That's not supported immediately off the bat.
Thomas Nielsen - getCore
11-Jan-17 5:36am
View
Recommend using telerics own support, they're quite talented!
This is not as such a .net issue as much as it is a component issue from your teleric ui component
Thomas Nielsen - getCore
9-Jan-17 2:29am
View
oh, wow. Never used that abbreviation for that - not for lack of doing such, not even when having problems with something in them :) thx!
Thomas Nielsen - getCore
5-Jan-17 3:06am
View
Is the problem with the update button in my example or in the code you supplied in the question? Notice the RowEditing is actually a postback that makes your GridView change controls by setting an edit index and that the grid has passed page load before the event method executes, is it also like that for you? Observe the Request.Form.Keys collection and see how the actual edit template controls 'behind the scene' has some different names than you might expect
Thomas Nielsen - getCore
4-Jan-17 4:56am
View
Eh, what project?
Sounds like you downloaded a project with only libraries and/ or without a startup project, defined in which case you cannot simply click run :)
Thomas Nielsen - getCore
29-Dec-16 6:09am
View
Your DbEntityValidationException indicates that the constraints in your EF are violated, did you add null where it mustn't and that lot. What version of EF are you using, what was the exception text, like the two other askers request??
Thomas Nielsen - getCore
29-Dec-16 6:06am
View
do you get the index variable filled correctly?
Your error means that either that row number doesn't exist on page one or the 2nd column doesn't. Your row command executes after your page load event, did you remember to load the grid again on the right page in your postback load event too?
Thomas Nielsen - getCore
22-Dec-16 5:01am
View
For instance http://stackoverflow.com/questions/9832974/how-can-i-use-viewbag-in-the-view
Thomas Nielsen - getCore
22-Dec-16 3:39am
View
Could you provide a series of times and what distribution on one list and the other should be the result? I also do not understand what do you mean populate time evenly? why is there 5.6 hrs (337 mins) between and to that end 2:20 - 2:50 why is that mentioned and not 1:30- 2:00 as an example? We have to know where you need to go to help you better about what way to reach there :)
Thomas Nielsen - getCore
21-Dec-16 8:35am
View
The error description 'cannot find endpoint' indicates that the adress is wrong in the config, not that it cannot find the config file.
Have you tried installing fiddler and verifying what endpoint it is trying to access?
Perhaps it's not more complicated with where you've reached already, than it's not trying to reach where you expect?
Thomas Nielsen - getCore
21-Dec-16 6:24am
View
can you rephrase that question, it doesn't make sense. json is a dataformat just like csv or clsx. do you mean 'Convertering a csv file to json format?' or something like that? It is confusing what you're trying to do the json file format is really quite simple but are you converting? in which case from what?
Thomas Nielsen - getCore
19-Dec-16 3:46am
View
this site is hosted locally, what happens if you type the address directly in a browser, do you see the service page when typing the endpoint address? When you click the wsdl link do you see it?
Have you generated a service reference in your mvc application and can you refresh that when you launch the service alone, detach and add service reference in your mvc project?
Thomas Nielsen - getCore
6-Dec-16 7:58am
View
What you're doing is when the execution gets focus so to say, you then make a rapid loop updating each of the values, which it's reach from say 0 to 10 in only a few milliseconds. Hence human eye won't see.
Your second attempt then is to refresh the textbox, well the textbox is not per say databound, so refreshing it won't produce the change you desire, and to sleep 100 milliseconds => 1/10 of a second well it would very likely mess a bit with the example which has a time ticking each 250 ms and each time it does it will carry a sleep of something random between 0 and 2000 ms well it could've looked sequential without actually being.
See updated solution and please mark the question as answered if you consider it to be :)
Thomas Nielsen - getCore
1-Dec-16 6:00am
View
Just updated solution for the 3.5 edition.
Thomas Nielsen - getCore
28-Sep-16 3:37am
View
You should not manually handle memory (almost) ever in CLR, when you do GC.Collect() your runtime will freeze all processes whilst compiling dependency tree for objects (to see if they're referred from active user space still or can be reclaimed)
What you should do is make sure that all Disposable controls are disposed when you form close or you're in for it, having to wait until the GC thread finds out that you're not using the objects, have an event listener you forgot to detach somewhere and it'll never happen!
I think it will be a good idea to add the code that actually fails and not your work-around trying to mitigate something which is likely to be a problem in the usage pattern. IF there is indeed a memory issue with Telerik controls, do report it to them, they have presumably a huge attention to remaining relevant to their customers, by producing quality.
Thomas Nielsen - getCore
25-Apr-16 2:28am
View
Yes, and there is the problem too. What you want to do is to mix two technologies, and that is a bad architecture even to say hardly possible at all. So BECAUSE you want multiple selections, autopostback is not possible, or you would post back for each selection (Because autogenerated javascript cannot know when you've effectively stopped selecting more). You can make that work, but it will work poorly as posting back an entire page per selection will cause reloads and your dropdown will collapse for each, not to mention the wait. Therefore INSTEAD of having a server side control at all, use the jquery multiple select client side control, now that can call your static method easily and the resulting json can populate whatever is reflected on your selections.
Thomas Nielsen - getCore
19-Apr-16 4:18am
View
Not sure i understand exactly, so they browse for an excel sheet which already exist, download it and make their changes and you then decipher what is new and update the database?
This cannot be done automatically, you'll have to write the logics yourself, which makes sense because you're the defender of your DB integrity
Thomas Nielsen - getCore
19-Apr-16 4:12am
View
but the question is wrong dear member 12255144, that's what i'm trying to relay. Imagine the use case, so the user expands your dropdown, wanna postback now? then user selects one item, wanna postback now? then another, wanna postback now?
That's why nobody else are answering, you're wanting to do the wrong thing!
now you could opt for asyncronous update, but then it's not postback in the sence where you can have a control, you'd need an ajax call. What i've unsucessfully been trying to relay and why i think the above IS a solution, even if that is to forget that idea and implement functionality differently that postback and server side control.
Thomas Nielsen - getCore
4-Apr-16 4:16am
View
MS Access has a brilliant import guide, so depending on how much you'd actually need to rerun this import a lot of times? ... if not use the import data guide, it rocks at that task.
Possibly you'd have to save as .csv first
Thomas Nielsen - getCore
1-Apr-16 5:55am
View
Error is not necessarily where you write //ERROR IS HERE,
it's just that it doesn't actually send the request until you call there, so all you know is that it is between instantiation of request and call to GetResponse()
Thomas Nielsen - getCore
1-Apr-16 5:50am
View
Why? You can visually design databases in every single client for such. so you want to have it UML like, well ok perhaps a bit special, still.
Have a look at entity framework, that does what you describe for you, if you wish.
Thomas Nielsen - getCore
1-Apr-16 5:47am
View
please poste code you want suggestions to, it's important if it's a server side control or client executing thing, as where the databinding happens, and when in the page lifecycle it happens if it's a page if it is a control
Thomas Nielsen - getCore
1-Apr-16 5:26am
View
I see your article, you cannot use clientidmode=static to get reference when it's a user control, but then you need to assign the clientid to some variable and then add click notification, while ultimately using the .js methods included in the sample article to perform the actual postback when appropropriate. As i wrote it should wait for possible more than one selection and therefore it cannot have autopostback, because that would be not waiting :) but is i'm trying to relay to you, it's possible to refresh whatever it controls in another way, but you have to accept it's another way than you originally thougth :) alternatively you must reengineer the usercontrol.
I'll update with links to facilitate teqniques outlined
Thomas Nielsen - getCore
1-Apr-16 3:54am
View
yea just pust clientidmode=Static on the control, then it has the same name client side, only there it's a container of sorts. very often a div.
But of cause if you abandon the idea of using a control like with the jquery suggestion (See the link), you don't need to access a page method at all.
You cannot call non static methods from a static method without passing an object and using reflection and well, not for web :)
However you can call static page methods to populate data and they just need som parameters to enable serving of most UI ideas, i'll add a link and update solution with example.
Thomas Nielsen - getCore
31-Mar-16 7:38am
View
Post the callstack
problem most likely happens while trying to load the data, but it'd be more serious suggestions if you could show the problem.
Thomas Nielsen - getCore
23-Mar-16 10:39am
View
super, see my solution suggestion below :)
Thomas Nielsen - getCore
23-Mar-16 5:00am
View
If I understand you correctly, you want to compare two files, line by line, and write that which is new into another file containing the increment?
Both files containing header rows, which chould be ignored ... also in the result file??
Thomas Nielsen - getCore
1-Mar-16 3:12am
View
Please post the Exception, it can give hint to your problem which propably relates the your webserver configuration. Does it allow sessions? is your session storage perhaps not available in production
Thomas Nielsen - getCore
21-Jan-16 6:04am
View
Yea it is :) of cause you need to have a keypress event then to clear the timeout and set a new one or store time of last keypress and let some shorter timeout verify that time was more than a plausible typerate and then clear and reset (to not get too many whilst a person is typing something) as an example, so yea the principle is the same but you are quite right in mentioning some of the details required for a good solution i totally agree, but just thought to ony outline the approach would be easily enough to get the asker Member 11382784 in the right direction
Thomas Nielsen - getCore
21-Jan-16 4:07am
View
Was there a question?
Thomas Nielsen - getCore
25-Nov-15 4:25am
View
What are you trying to do when that happens. I believe you've spent 2GB of a 32 bit process or your system is simply eh well out of memory because it's not onboard so to say.
Please describe the operation you're attempting
Thomas Nielsen - getCore
18-Aug-15 3:49am
View
With the risc of misundertanding your ambition, and because i've not been programming C++ for some 18 years :)
When in a unit test project you would genrally in C# want to provide som test data object, severing to the database and then instantiating for instance your form and exercise it. say your unit test class instantiates then makes your form. it will then run a part of functionality as you wish, repetedly for as many unit tests as you make with option to run code before and after each such.
if your cursor is within a test project "ctrl+r, a" will execute all tests, "ctrl+r, d" rerun last testrun and "ctrl+r, f" run all failed tests again "ctrl+r, t" runs the test your cursor is in or if outside testmethod all tests in this test class.
Much faster often, to run all unit tests before running, is this what you're trying to do?
Closest thing i know from VS C#
Thomas Nielsen - getCore
23-Jul-15 4:17am
View
Deleted
which part is not working?
a. Changing your digit seperation from . to , ?
b. changing 0,983 to 98,3% ?
c. Something else (what) ?
Thomas Nielsen - getCore
22-Jul-15 7:03am
View
So you have data and you want to push it to percentage, like multiplying with 100 and your % in DataTextFormatString takes care of that, the Locale handles your other request, to change the decimal point from . to , ( see https://msdn.microsoft.com/en-us/library/system.data.datatable.locale(v=vs.110).aspx )
Thomas Nielsen - getCore
6-Jul-15 7:35am
View
no, doesn't relate to redundancy. The question was how to avoid duplicates. Redundancy refers to duplicating data on each row which could be normalized into seperate tables to provide a smaller row with just an id key as a reference e.g. This way data would only be there once, in the referred row.... but that's not at all what the question is about. Unni want's to use an index to avoid having to do anything else and still avoid duplicate entries.
In this case, the constraint of uniqueness on an index can ensure that, but it's not the purpose of an index or a constraint, which i try to examplfy then is, another way to ensure that the data being inserted is unique which was his objective.
Thomas Nielsen - getCore
8-Dec-14 16:17pm
View
i would never update anything based on a cursor, in fact the only type of cursor i would ever use is a forward_only one and that would be designed to fish out the id's i would want. Mostly i use temp tables for that purpose though.
Perhaps saying that I use the key for updating is a bit unclear from some angle and since we agree it is the unique identity of a row i think we're close enough to eachother and the differences mostly due to the translation, and that your original 'it is not true at all' which spawned by need to explain how that wasn't entirely all wrong since it most certainly is what we select, update and join by most of the time. I dare say, most of us in the business of information systems with relational databases worldwide. But you are of cause right that the role of the primary key is to identify a row uniquely and the fact that this makes it usefull to control what to do with that row is with sufficiently nerdy glasses on, only secondary B-)
Thomas Nielsen - getCore
8-Dec-14 3:08am
View
Lolo ... ahem, primary= first, key= can unlock. Have you even begun to see the execution plans for queries that dos not use indexes?
Trust me the purpose of the primary key is exactly as i stated, but don't take my word for it, what about w3 schools? http://www.w3schools.com/sql/sql_primarykey.asp (notice that primary key is ALSO a contraint which makes it superflous to mention that both things are called that too, for the understanding of the usage.)
heh, and you state "the primary is here only to identifiy uniquely" in what way is that different to "institutes the identification of that .. row" ? You're even saying the same thing :)
And again 'we' meaning me and the people i work with, DO use primary keys for updating, because it is by far the fastest method and a prerequisite for linq to sql and entity framework to function properly.
Thomas Nielsen - getCore
18-Nov-14 9:13am
View
No but there is a pretty good WYSIWYG query editor, just add tables and click to form your query, then base your second on that other query and then switch to sql view and you will let MSAccess write the access sql for you, which is practical
Thomas Nielsen - getCore
13-Nov-14 8:06am
View
Well gmail have some issues concerning that, where you have to enable email emissions first. But generally you have to specify username and password if you get a 5.5.1, your solution 2 appears to have a good suggestion. Notice the System.Net.NetworkCredentials part and check with your provider if you have to specify ssl with the EnableSSL settings, or just try it with EnableSSL = true for starters, if they support it use that or you'll be senting you credentials in plaintext, but surprisingly many do allow the non ssl version :)
Thomas Nielsen - getCore
12-Nov-14 4:44am
View
drop a try-catch around and then catch the callstack of the exception and post it on your thread here, we'll be better positioned to help :)
Thomas Nielsen - getCore
3-Oct-14 2:40am
View
A pleasure to spill a bit of what remains in the little grey cells from experience :)
SQL Express comes with a free license for non-commercial usage. So you'll have to look in the mirror to see if that's what you're doing. Any version of SQL server can be configured to allow remote connections and your sql server configuration can set to allow tcp for instance.
Then decide perhaps if you have limited number of users or your application can have it's own single login to use sql server authentication. Just remember mixed mode when you install, in case you wanna change your mind!
getting it there is more easy to detach, file transfer and reattach using sql server management studio.
If you want to be able to see what users are using the system while it runs, from sql server, you could opt for a windows authentication.
You can deploy an application with an instance of a db, but other programs will have to access that db through the application then, which really isn't that widespread i believe. Would be ser server application then. What i can think of just off the bat :)
Thomas Nielsen - getCore
1-Oct-14 8:56am
View
Does DB-1 and DB-2 refer to these data being in different databases?
Is it relevant if the query is performend in SQL server (TSQL) or using .net for instance?
Thomas Nielsen - getCore
1-Oct-14 8:48am
View
add your aspx code if you want a more descriptive explenation than the one ChintanShukla just provided :)
Thomas Nielsen - getCore
1-Oct-14 8:45am
View
You should not think that your sql server is something that should deploy with your project as such it should always be there and your project should connect to it.
My best bet is that your architecture is wrong because your mdf file should not be part of your project or deploy with it because that would put it on each of the clients and their updates would of cause disappear to each other unless you have a very clever and completely unnecessary replication- and distributed database setup.
Thomas Nielsen - getCore
1-Oct-14 8:28am
View
Would you prefer JSON or XML format for serialization format?
Can you examplify the columns in your data??
The best serializers work on contracts or classes and are controlled by adding attributes to a data class so it can influence the implementation and make it much more clear to use and maintain, to be specifik.
Thomas Nielsen - getCore
25-Sep-14 2:51am
View
Few suggestions:
1. Consider moving the recursiveness to the sql server for efficiency.
2. Keep your connection open from start to finish of recursion alternatively.
3. Move the transaction out of the executing procedure as well or you'll still end up with half rollbacks.
4. If you have a transaction, you should be rolling it back in the catch block
5. Several catch blocks have ex.Message.ToString(), that makes very little sense, at least log errors suggesting the combination of Log4Net and BareTail log viewer for superior insigt to application performance, but you could just have an event to offload logging responsability. Point being that your scenario is uneedingly clouded and adding instrumentation could make the picture more clear.
Thomas Nielsen - getCore
24-Sep-14 7:44am
View
Well it's not that you cannont but the MDF file is a datbase file. Normally the reason to use a database file is that you want several people to access the same data or parts of it, make individual rows in the same table e.g.
So if you install two different mdf files on two different users, you have two databases, not one, which is not likely to be what you want or perhaps i misunderstood the problem you face?
Thomas Nielsen - getCore
24-Sep-14 4:39am
View
presume because your database is also local ?!
Thomas Nielsen - getCore
17-Sep-14 4:20am
View
make a stored procedure instead!
If you must do this, use string.format method instead to clarify your syntax and/ or put the sql statement into a variable before assigning to cammand text, then place a breakpoint and copy paste to your MSSQL management studio or whateer rdbms client you have and try to execute to get more help on the problem if it isn't already clear
Thomas Nielsen - getCore
17-Sep-14 3:07am
View
please add table definitions, it is likely that something usefull is missing there
Thomas Nielsen - getCore
17-Sep-14 3:06am
View
First of all, if you have the time, consider storing something else than the image in the database?
Images are big things and you may discover that when space begin to run low on your database server, that the tables taking up space is pictures.
Were you to store the location on your fileserver or webserver of the images you will see that the browsers are anyway caching the images and the access time will naturally get faster.
Generally it is not recommended architecture to store binaries in RDBMS
Thomas Nielsen - getCore
17-Sep-14 3:00am
View
Can you post your table definitions?
It will enable us to quickly set up a system like yours and test the procedure. First guess I would vote for wthat _Maxxx_ suggested.
Thomas Nielsen - getCore
12-Sep-14 4:43am
View
you cannot really. One option is to write in in a code behind global file, then people have to disassembly your code to read it.
Or you'll have to encrypt/ decrypt when writing the the connectionstrings element
http://msdn.microsoft.com/en-us/library/system.security.cryptography.aes(v=vs.110).aspx
Thomas Nielsen - getCore
12-Sep-14 4:06am
View
Appears to be missing central components in play. Like what kind of DataGrid? What data is loading? What are you binding to what and where. I'm not sure it is correct to assume that the problem is in your filter context menu click method.
Must post more code or reproduce the problem in a simpler solution that you can post from to get help here. right now it's a bit like a problem description 'i get wet, please help me' but we have to know if you're in the rain, somebody's pointing a firehose at your or you're standing in a pool :)
Thomas Nielsen - getCore
12-Sep-14 4:01am
View
An alternative reason is that the rights of the sa account doesn't extend properly to the object you're trying to get. Of cause SA shouldn't be used by an application because it is from origin unrestricted. If it doesn't have rights, another user than sa has dbo permissions perhaps and that's really weird in a number of ways but it's possible. check the rights and do make a login intended for that purpose as it will show nicely everywhere. You'll like yourself for it later :)
Thomas Nielsen - getCore
10-Sep-14 3:14am
View
Ok, i see the solutions are comming in. Great!
i would second the thought of moving to MSSQL, the problem being that MSAccess is an ISAAM database and essentially meaning a flat file with data stored sequentially and this will not perform if data is big enough. Access also supports being an ADP which will allow you to continue to use access but against a MSSQL database backend which is very efficient combintation. if you use MSSQL Express formely known as MSDE you can use it for free.
Anyway then you could use MS SQL Management studio to look at 'actual execution plan' which would suggest you possible indexes depending on your query, which could also help.
The root of the problem you experience lies in your wildcard searches but the right solution if everything being filtered on is indexed properly is already being developed on this thread i see, so my five cents of suggestion is to change to Access ADP. From personal experience when users increase over a certain number, more or less just beginning 2 digits of concurrent users, you really wont get the performance we all love from an ISAAM 'RDBMS' so begin that migration project too i would suggest. But of cause all text searches should have indexes on what is being wildcard ('like') searched on :)
Thomas Nielsen - getCore
9-Sep-14 6:41am
View
a procedure doesn't load, it executes.
So paste the TSQL and we can possibly help you :)
Then the actual question will be how do i make my query faster!
Thomas Nielsen - getCore
9-Sep-14 2:56am
View
Is this an oracle backend or Access?
Thomas Nielsen - getCore
4-Sep-14 5:36am
View
The genereated link, what is those semicolons doing there, cannot really see what place they have in your querystring? Looks like your adddate and addbill QS parameters are not written like they should
Thomas Nielsen - getCore
2-Sep-14 2:48am
View
Can you drop your table structures in this post?
Looks like debugging your challenge will require actually issueing the query and it would be helpfull with a couple of create scripts to be in the same setup like you and only will have to drop a bit of data to investigate, thanks.
Thomas Nielsen - getCore
26-Aug-14 3:02am
View
If you have a varying number of columns, i would use another programming language to handle that before uploading, reason being that TSQL is very ancient as a programming language in terms of features. Have a fixed with and avoid having to do advanced logics that is not operating on sql related matters like mapping. For instance if your WCF service recieves the upload, preprocess the file and upload the parsed one to the database, you'll propably find your development time much decrease, readability of your stored procedures increase as well as overall performance.
As such though if you know the maximum number of columns and the columns that are not there are always at the end of the insertion list and it allows null, you should be able to get to the goal line with your setup, but it is much too tedious and unnecessary an architecture to be recommendable for your business problem IMHO.
Thomas Nielsen - getCore
21-Aug-14 5:47am
View
What's the question?
If we are to reproduce your problem, you have to include code to define your tables/ views and populate them with some data or we'll all have to do that ourselves to help you.
Thomas Nielsen - getCore
21-Aug-14 3:19am
View
Sounds like you have some event lifecycle code which doesn't execute when you think it does and propably too often. If you want help from the community here, you'll have to post more code.
Thomas Nielsen - getCore
20-Aug-14 9:53am
View
MSAccess doesn't use Transact SQL like MSSQL does. One of the differences is that IIF doesn't exist until mssql 2012 and you likely have to convert it into language applicable function as well as your double quoting. but hey export your data to a csv file from access and import it into the mssql as i'm sure your export will work because that's the platform you're moving from?
Alternatively you can consider linking access from mssql http://msdn.microsoft.com/en-us/library/aa213778%28v=sql.80%29.aspx
Thomas Nielsen - getCore
20-Aug-14 4:38am
View
You are very welcome Naveen. You cannot remove audits without reducing the number of connections. This means that in a situation for example where you have static class that keeps a connection open at all time, like for instance a connection factory which could then keep a pool of open connections at hand at all time and use those and keep some open and ready, and that part will not affect your performance.
Another solution which could be worth working with is increasing the 'max pool size' setting, making sure you connect with the same connection string all the time and remember to use the 'using' notation around connection strings if you're going for the pool size solution and ideally with the factory model also (as your dispose can be what gives it back to it's queue)
Thomas Nielsen - getCore
19-Aug-14 2:42am
View
I didn't read the article that inspired you. But generally you should not use ASP.Net to schedule if it can be avoided. The problem is that the WAS will recycle your application pool if it is unsused for a while.
Of cause frequent enough activity can make it work (stay alive) but then you'll need globals and other that really doesn't inherently work well with the stateless nature of ASP.net
So i would recommend if you must host on iis to use a wcf service. This one can be configured to more or less stay alive and cannot get called directly at least if you have some level of security.
If you can move the code to a Windows service, like RyanDev suggested, it would be preferable to avoid sharing life and death with the iis service subject to it's thread handling.
Thomas Nielsen - getCore
19-Aug-14 2:34am
View
does the data have to land in a database containing other data or simply the move to another server?
Thomas Nielsen - getCore
22-Jul-14 9:40am
View
glad i could help
Thomas Nielsen - getCore
22-Jul-14 9:11am
View
That is a very informative link and it may help somebody some day understanding why indeed. The essentials ofyour solution is, that you move data from ViewState to SessionState which is to say away from ViewState when you're not making full postback which was what i suggested, but without code examples it was difficult to show you how and as you'll see on these comments and the direction from the solution it was all about loosing your variables in viewstate, which utlimately you did. Although the naming is somewhat unfortunate as it a session variable named viewstate may be confusing to the next guy maintaining your code :)
unless you're writing back to the .net input named __ViewState in which case .. well that's somewhat unecessary
Thomas Nielsen - getCore
22-Jul-14 8:17am
View
What that your problem was the viewstate? I new you would find it with the MSDN links i posted. and i believe it is now 4 days since i mentioned that you should do what you wrote 20 mins ago that you did ;)
Thomas Nielsen - getCore
22-Jul-14 8:02am
View
Pleased to know :)
Remember to mark as answered and happy trails!
Thomas Nielsen - getCore
22-Jul-14 7:49am
View
and that is Your ViewState, you could be facing something like http://social.msdn.microsoft.com/Forums/vstudio/en-US/25f2886c-b560-434e-8dab-44a8adf4d34a/the-state-information-is-invalid-for-this-page-and-might-be-corrupted?forum=netfxbcl
Thomas Nielsen - getCore
22-Jul-14 3:35am
View
Yes isn't that what you're posting?
"Exception Details: System.Web.HttpException: The state information is invalid for this page and might be corrupted."
Thomas Nielsen - getCore
18-Jul-14 4:31am
View
You could use a webservice, but the essential here is getting rid of the contens of ViewState here, like what you've posted, and in that relation it doesn't matter which way you're getting data
Thomas Nielsen - getCore
18-Jul-14 3:52am
View
ment in the browser :) ViewState as you propably know sends data to and from the browser instead of keeping it at the server and hence the document load in the browser increases when it is in use and it is not a godsent in relation with partial postbacks, such as webmethods
Thomas Nielsen - getCore
17-Jul-14 6:50am
View
use the page directive on top of the aspx file or even in web.config EnableViewState=false, then it cannot fail because it is not beign used and you should of cause verify that you are not using ViewState["yourvariable"] like structures anywhere or they'll stop working :)
Thomas Nielsen - getCore
17-Jul-14 6:08am
View
looks like you're using webmethods for partial postbacks and i guess some of the modified stuff belongs to the full postback and .net deems it out so to say.
consider not using viewstate at all and simply turn it off if avail
Thomas Nielsen - getCore
25-Jun-14 2:49am
View
Odd, it does for me every time :)
Then maybe you're not using MSSQL Management Studio or your job is not stored on the MSSQL server?
Thomas Nielsen - getCore
25-Jun-14 2:46am
View
That' procedure is just way to big! Chop it up and you'll possibly find your mistake along the way :) And find more helpfull contributors ;)
Thomas Nielsen - getCore
19-Jun-14 6:11am
View
Do you want to submit to this form or do you want to simply redirect or do you want to read it into your application to do something with it?
Thomas Nielsen - getCore
28-May-14 3:01am
View
i don't entirely understand. The @var1 is of type varchar, so it can never be 2000, perhaps '2000' but you're setting it to '@M201305' and selecting it here.
Can you write what you want to do in pseudocode or simply english?
To my mind the point of what you're trying to is somewhat muddy by some mis-step in how to do it which of cause is why you're posting at all :) perhaps it's just me being dull witted but i don't get it yet :)
Thomas Nielsen - getCore
7-May-14 7:59am
View
oh yea, my bad
Thomas Nielsen - getCore
7-May-14 7:39am
View
I got insecure if you're doing web or windows because of CHill60's comment ?
But if you're doing web you cannot control how browsers implement target="_blank" in a browser.
If you're doing windows it isn't really hard, but you shouldn't use multiple UI threads, instead use multiple worker threads or threadpools to offhand the work to be done so no work of any measurable length is done on the ui thread, making it idle to do ui refreshes all the time or as requested and/ or when results come in.
Thomas Nielsen - getCore
7-May-14 6:50am
View
MDI is an abbreviation for Multiple Document Interface, a modern browser is a MDI because it can contain multiple documents, one in each tab in the same application, (see: http://en.wikipedia.org/wiki/Multiple_document_interface)<br>
Hence it relates to the question that he wants to open a in another tab or generally that is document in that same application and not a new one!<br>
(unless i misunderstood and it is really a windows application he's building ^_^)
Thomas Nielsen - getCore
10-Apr-14 4:19am
View
Hi Mariana
You're very welcome. Perhaps you're experiencing what nother one has experience here:
http://stackoverflow.com/questions/9324088/how-to-use-datatable-select-to-select-null-empty-values. The values are not actually null but changed to be zero length strings?
Thomas Nielsen - getCore
9-Apr-14 5:27am
View
Please elaborate your question, what are you connecting with?
Obvious suggestion would be to increase the pool size and or connection timeout, but the way you connect is important in that.
Thomas Nielsen - getCore
8-Apr-14 9:32am
View
eh, show that like this where?
Thomas Nielsen - getCore
2-Apr-14 8:01am
View
I suppose your database table column would be some sort of appropriate length varchar or nvarchar and that will translate into a string in .net when you read it.
Thomas Nielsen - getCore
2-Apr-14 8:00am
View
Are you using forms authentication?
Thomas Nielsen - getCore
2-Apr-14 7:47am
View
So you need the general construct from above, and make the two manually passed parameters variables and you should be good to go
Thomas Nielsen - getCore
19-Mar-14 8:51am
View
can You please reprase the problem i do not understand what exactly is the problem
Thomas Nielsen - getCore
7-Mar-14 3:07am
View
simple old fashioned for loop should do it, say you wanted hundred for(idx = 0;idx < 100;idx++){for(ix = 0;ix < 4;ix++){ //Do your get next random numer construct} //do what you want with individual sequence}
Just remember that you mustn't new the Random object up every time or you'll get the same sequence..
Thomas Nielsen - getCore
6-Mar-14 17:14pm
View
I vote for update panel with scriptmanager with allow partial postback then put them in same update panel.
Your post that it works on another page would seem to have a quickfix at deleting this page, making a new page and pasting back? But then that wouldn't be very academical :D
Thomas Nielsen - getCore
6-Mar-14 17:08pm
View
I'm trying to wrap my head around what you want to do.
Your DataGridView is a control and can therefore be invoked. Most of your code appear to depend on that. What's left if you remove it?
Do you want a data class you can call for instance in a method with datagrid to have i populated and then in a way get it rebound if insertions occur?
Thomas Nielsen - getCore
5-Mar-14 13:12pm
View
should your procedure do an insert and in case it exists, update intead?
Thomas Nielsen - getCore
5-Mar-14 13:01pm
View
What is your class Class1 == ob, definition?
Thomas Nielsen - getCore
5-Mar-14 8:32am
View
What type of binding do you use on the endpoint?
Thomas Nielsen - getCore
5-Mar-14 5:56am
View
html table is a server side representation of a tabular viewing structure in html.
It has nothing to do with a data table, so it cannot be done.
Maybe from what you write you will see the answer to what you need in object data sources, will update solution.
Thomas Nielsen - getCore
5-Mar-14 5:31am
View
i am unsure what you want to loop, forever? a random number of times?
Thomas Nielsen - getCore
4-Mar-14 8:40am
View
using System;
i've added my usings to an updated solution
Show More