15,886,542 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 Sinisa Hajnal (Top 200 by date)
Sinisa Hajnal
30-Apr-20 5:46am
View
Just blindly...do replacements as high up as you can so they are triggered on lower number of rows
Do memory or temp tables, fill them independently and then join them
explicitly write out joins instead of local, foreign
consider having a column in the table that already has 'searchable' version of the name so you can do all those replaces when inserting or updating instead in WHERE clause (bad practice)
Sinisa Hajnal
30-Apr-20 5:42am
View
Next time google it, it is not hard to find conversion online. Check the solution down in the solutions and bookmark the link.
Sinisa Hajnal
29-Apr-20 6:22am
View
And please format that javascript so people can read it.
Sinisa Hajnal
29-Apr-20 6:19am
View
Plenty of tutorials (just google it) and when you have programming question, come back. At the moment, you're just asking how to program
Sinisa Hajnal
29-Apr-20 6:17am
View
if and only if you control both domains (actually, both IIS), you can allow cross domain request from trusted domain.
Sinisa Hajnal
29-Apr-20 6:06am
View
Also, you already know which line you're replacing, don't do foreach, just replace that single line
Sinisa Hajnal
29-Apr-20 6:03am
View
1) don't EVER concatenate user input (google SQL Injection)
2) check that all data contains correct TYPE of data (it would help if we had column names or useful control names txtEmploymentDate or txtSalary or something)
Sinisa Hajnal
29-Apr-20 6:00am
View
You shouldn't concatenate in the INSERT statement, you're using parameters in other queries.
Did you try a) set a breakpoint and see if lblID.Text contains the value b) try..catch around execute non-query to see if something breaks (you should actually have it all around the code c) what is the returning value of ExecuteNonQuery (i.e. does ID exists and it tries to delete correct record)
Finally, you should call close and dispose in finally block so you don't get memory leaks on exceptions.
Sinisa Hajnal
29-Apr-20 3:55am
View
If the image is always the same, don't do server side. If it is not, check the path (you may lack slash(/) after double dot).
Sinisa Hajnal
10-Jul-19 10:43am
View
Start with code project, stack overflow and similar. Learn to use search engines to find examples and/or similar solutions. Learn programming language in question and write or use the code to get something, tweak it until you get what you need. Then, when you hit the wall and you don't understand why it doesn't work, return here.
Sinisa Hajnal
10-Jul-19 10:41am
View
Check that everything you need is deployed on the target computer (you need Crystal Report runtime) and that access database is reachable and that your account is set up correctly (depending on how you access the database).
For error, check windows event log. Sometimes invisible errors get caught in windows error net.
Sinisa Hajnal
10-Jul-19 10:39am
View
Step through the code and see which line throws the error. My guess is that row is null after readline.
Sinisa Hajnal
3-Jul-19 2:25am
View
Goran, ovo nije dobro pitanje, imaš gotov kod, nemaš pogrešku, a ne razumiješ ga.
As the commenters above said, you have everything you need in the code above. Especially since you need only first page (the easiest). Remove the loop, take only 0-th index and you're done.
Sinisa Hajnal
3-Jul-19 2:19am
View
What error do you get? Check the path to the image. Check that your app has access to the image especially if you have location blocks in web config.
Sinisa Hajnal
3-Jul-19 2:18am
View
What is the problem with the code? What error do you get? Where?
Sinisa Hajnal
3-Jul-19 2:16am
View
Why not make a report that takes the data and prints details each on its own page? And where do you use your pagebreak class?
Sinisa Hajnal
3-Jul-19 2:13am
View
Write some code, there are lots of examples for Office integration. Ask us again once you have something to show.
Sinisa Hajnal
3-Jul-19 2:12am
View
You want your setup application to install sdelete? You can add the packages of whatever in the project and run the command as one of the steps. But the user will still get to choose if they want it.
Sinisa Hajnal
3-Jul-19 2:10am
View
Put all those huge cases into functions and test them in isolation
Sinisa Hajnal
3-Jul-19 2:08am
View
What is the problem with the code? Reading values from excel is well documented and replacements can be done through dictionary, either in code or in the database table. You can do replacements in the code or within stored procedure which inserts new data (just consult your short names table).
Sinisa Hajnal
2-Jul-19 7:00am
View
A guess: look through the api and find a function that detects which card is which and what is the result you get back. Then hide those who aren't in the result.
Sinisa Hajnal
2-Jul-19 6:58am
View
How is it possible that you have unknowable reports? If it is something user can select, you can have a report with all the fields and simply control the visibility depending on user choices. But report is usualy just a template to show in fancy way what would otherwise be plain data grid. But that requires purpose, you show data certain way to communicate information, not just to dump data, you can do that in CSV file too :)
Sinisa Hajnal
26-Jun-19 9:42am
View
Depending on business needs, it may be better to have one table with all backups (kind of history table with timestamps of each backup). That way you can have all the data in one table and request the data from certain date without having to change the tables
Sinisa Hajnal
26-Jun-19 9:39am
View
Create unique identifier in your database (autoincrement ID is fine) - include it in your query and hide it in the datarows. That way you can call insert, update and delete with primary key. And rowindex will not be a problem anymore.
Sinisa Hajnal
26-Jun-19 9:36am
View
You should accept this as the answer so that other can find it.
Sinisa Hajnal
26-Jun-19 9:35am
View
I realize this is probably just question code, but in general, you shouldn't have "magic numbers" in the code (in this case port number)
Sinisa Hajnal
10-Jan-19 6:12am
View
Why don't you just change the app design so you don't depend on the init event? Load required data and render it at a later event.
Or...pass the search parameter as part of the url, that way you will have the info regardless of the page life cycle
Sinisa Hajnal
10-Jan-19 6:09am
View
Why not reset the value after the message, but before calling end?
Sinisa Hajnal
10-Jan-19 6:05am
View
Why not put background-image css property on the nav element?
Sinisa Hajnal
30-Nov-18 2:53am
View
You wouldn't. Session is (or should be) per user, so no problem there, it should work. Scalability and throughput are determined by your host. If your current provider cannot handle the volume (or your current tariff doesn't) you may need to upgrade your package or change the provider.
Only thing you can change is your code so make sure it is performant, find out any chokepoints and resolve them (there are tools for such testing)...in general, if you have good, performant code, only thing you can change is your infrastructure.
Sinisa Hajnal
30-Nov-18 2:49am
View
Can you show some of the code? Do you change workstations? Are there any changes in the project settings?
Sinisa Hajnal
30-Nov-18 2:47am
View
1. Please post only the relevant code
2. English is not your first language, please try describing what you need with an example. This is unclear.
Thank you
Sinisa Hajnal
30-Nov-18 2:43am
View
Is there a reason you cannot change NameAndScore with GetGameData (just name change) and adding required functionality?
Sinisa Hajnal
30-Nov-18 2:26am
View
I would simply drop and recreate it. This seems as more trouble than it's worth. Also. try googling it.
Sinisa Hajnal
30-Nov-18 2:10am
View
Connect to each in turn and check. If you need speed, create fifth "common" database that will sync and index the data you need to check (mobile numbers) and check only that one. More setup initially, but much faster than using four connections.
Sinisa Hajnal
30-Nov-18 2:04am
View
This is not a site for "give me teh codez" requests. Do some research, write some code and ask for help when you have the code written. In the meantime, there are plenty of tutorials and answers concerning web services and their use / consumption.
Sinisa Hajnal
30-Nov-18 2:02am
View
What do you mean it "refers to two different tables"? If you store value from two tables in the same column, rethink your design. Also, you didn't really try anything, write an SQL query, see what works and what not and ask help with that.
Sinisa Hajnal
5-Nov-18 6:54am
View
.NET has Math library that has everything for your rounding needs.
Sinisa Hajnal
5-Nov-18 6:42am
View
Find current version of the API and read its documentation.
Sinisa Hajnal
5-Nov-18 6:36am
View
Don't do hidden, do visibility: hidden - display: none will not be rendered on the page and you will not be able to assign the value client side.
Sinisa Hajnal
5-Nov-18 6:34am
View
Don't post comments as solutions. Edit your questions or comment on the answer you're given. If you're beginner in C#, you shouldn't play with advanced topics. For what you want, instead of writing your own browser, connect to one of many VPNs, I'm sure you can find some that aren't blocked. Good luck
Sinisa Hajnal
13-Sep-18 7:11am
View
This really shouldn't be a question. You could easily google it.
Sinisa Hajnal
13-Sep-18 7:09am
View
You need to convert each 4 bits independently. You code works in reverse order, if you check it from right to left, you'll see 2E 0C.
Sinisa Hajnal
13-Sep-18 6:59am
View
You really shouldn't have hard-coded paths to images. Also, you can put images through properties of the grid instead of programatically adding everything. Play with grid properties, you'd be surprised what can be done without coding.
Sinisa Hajnal
5-Sep-18 2:30am
View
What have you tried?
Sinisa Hajnal
5-Sep-18 2:28am
View
I strongly agree with this CHill60. Write your database first and then code over that. Database is made to work with data, code is for logic and presentation.
Sinisa Hajnal
5-Sep-18 2:19am
View
You could go into jQuery code and simply copy it. For selectors, modern javascript has querySelector and querySelectorAll on the document element that works very similarly (same?) to jQuery selectors. Same for events, there are some that relate directly and others that can be used instead of some of jQuery ones. Again, you can use jQuery code to check how they are used.
Sinisa Hajnal
5-Sep-18 2:16am
View
There is a property on the grid and event for key press. Intercept enter and current cell to (last row, 0) <- you can get last row by datagrid.RowCount property.
Sinisa Hajnal
5-Sep-18 2:11am
View
What kind of list? You're in console app, you just write out strings formatted as you need them to be.
Also, it may be useful if you describe what you're trying to do with your app in general, not just this particular task.
Sinisa Hajnal
1-Mar-18 2:22am
View
Go with java or .NET, they are most universally used
Sinisa Hajnal
27-Feb-18 4:08am
View
You add < button > element and onclick event. you call the same function you used on row click.
Sinisa Hajnal
27-Feb-18 3:42am
View
Reported as not a question. Please delete.
Sinisa Hajnal
27-Feb-18 3:40am
View
try with vertical-align CSS property. Try also just giving line-height of the button to row height (or just say line-height: 2em; )
Sinisa Hajnal
27-Feb-18 3:34am
View
Have the server assemble the array and just emit it into the script, your repeater wastes lots of time with something server could do in milliseconds. Other than that, calculation should be straightforward with onblur or onkeypress (Enter charcode 13) calling the function to recalculate.
Which part of your code doesn't work? And what error (if any) do you get?
Sinisa Hajnal
27-Feb-18 3:31am
View
Did you google it? I would expect you could find plenty of results. You should stringify entire data object, not just filename.
Sinisa Hajnal
7-Feb-18 8:48am
View
Either refresh the data source (rebind the grid) or delete the row with javascript client-side either before or after your trip to the server. Both are well documented.
Sinisa Hajnal
7-Feb-18 8:36am
View
Maybe you could add listener to the background panel too? Never tried it though, just a suggestion.
Sinisa Hajnal
7-Feb-18 8:33am
View
why?
Sinisa Hajnal
1-Feb-18 9:03am
View
this!
Sinisa Hajnal
1-Feb-18 8:49am
View
All controls are on the same form. Just put text2.Text = text1.Text on button click. If you want to avoid button click you can use Leave event of the text1.
Sinisa Hajnal
31-Jan-18 2:53am
View
If you have master page, you adjust content container. If not, you should have top element with the same class name. That way you adjust CSS on that class (adding negative margin) and you're done with all pages. If you designed it so that you have to change multiple pages for single change of CSS, there is a better way. Use the fact you have to go through each page and add needed class to the elements you need to change.
Sretno! ;)
Sinisa Hajnal
24-Jan-18 6:15am
View
You don't need new DataTable if you're assigning the value in the following line. Just call DataTable dt = (DataTable)Session["Data"]
Sinisa Hajnal
24-Jan-18 6:12am
View
Try calling dt.AcceptChanges
Sinisa Hajnal
24-Jan-18 6:09am
View
In what way is it wrong? Do you get an error? Or just wrong count?
Sinisa Hajnal
24-Jan-18 6:05am
View
Do you mean that button click on the first page needs to generate one button and one dropdown in each row on the second page? In addition to bound data? Where do you get dropdown options from?
Sinisa Hajnal
24-Jan-18 5:54am
View
You're not checking if the key exists uncheck method. Go step by step, find out which line causes the error and check that part only.
Sinisa Hajnal
24-Jan-18 5:51am
View
You cannot call ArabicMethod like that. You should use resource files, not have your own logic for that.
Sinisa Hajnal
22-Jan-18 11:14am
View
put these three lines just before ajax call. console.log(qId); console.log(text); console.log(rate);
open development tools window (F12) and check for the values of your variables in console window.
For code debugging, you have to have real debugging, no exceptions.
Sinisa Hajnal
8-Jan-18 10:19am
View
This should be refactored, not used :)
Sinisa Hajnal
29-Dec-17 11:24am
View
Why not populate textbox2 at the same time if they are populated with same value?
Also, rename the controls to something meaningful, you'll thank yourself in months to come.
Sinisa Hajnal
28-Dec-17 2:41am
View
Please use improve question link and move this code into the question.
Sinisa Hajnal
28-Dec-17 2:39am
View
You want CHAR(10)+CHAR(13) (wild guess :) )
Sinisa Hajnal
21-Dec-17 8:30am
View
Work on your project and when you get stuck, come here and ask question how to resolve some particular problem, do not ask us to make the project for you. There are freelancer sites where you can pay people to do it for you.
Sinisa Hajnal
21-Dec-17 8:28am
View
Why not import the data on button click? Why do you need to create the link? Yes, it is possible to create the link on button click, but without more details hard to tell you how? Or even if there is better way.
Sinisa Hajnal
21-Dec-17 8:20am
View
Seconded! There are differences between DataGridView (win form) and DataGrid (web form), you cannot just copy/paste the code.
Sinisa Hajnal
21-Dec-17 8:18am
View
Just setting minDate on the enddate picker should be enough. The user cannot select the date less than minDate.
Sinisa Hajnal
21-Dec-17 8:15am
View
Why not use http session? Also, you're not showing if you set http session variable somewhere. Finally, you should just pass the data to the library, not count on the session object to hold it for you.
Sinisa Hajnal
20-Dec-17 2:41am
View
Return sorted data from the data source?
Sinisa Hajnal
20-Dec-17 2:40am
View
Why not create view which you can control access to and allow users to see that directly or through some custom form? Or show the data in the report (based on the data and allowing users to filter the data)?
Sinisa Hajnal
20-Dec-17 2:37am
View
What does their docs say?
Sinisa Hajnal
20-Dec-17 2:35am
View
In essence, you need either first thing after base url or first thing after baseurl/sites. Not that hard to do, try it and let us know.
Sinisa Hajnal
18-Dec-17 8:12am
View
Step through the code and see when the count is lost. Try using session instead of view state. The code looks alright on the quick pass
Sinisa Hajnal
18-Dec-17 8:10am
View
You're using datatable object without calling dataaddapters fill method da.Fill(dt). Instead you're creating new DB_Member (who is by default empty, unless you filling it in constructor from your session object).
Sinisa Hajnal
18-Dec-17 8:04am
View
error function has three parameters, status, error and the original request. Check them out.
Sinisa Hajnal
18-Dec-17 8:02am
View
If you want to pass less parameters, you need to specify default values for "missing" parameters.
Sinisa Hajnal
18-Dec-17 8:01am
View
You'll have to add more details. What is the problem? What are you trying to do? What do you expect to happen and what error do you get? Also, replacing magic numbers with suitable constant names is good practice.
Sinisa Hajnal
18-Dec-17 7:57am
View
What kind of problem? Is your office (excel) set up to support Turkish characters?
Sinisa Hajnal
18-Dec-17 7:56am
View
Deleted
Try simply putting the result into the element without concatenation.
document.getElementById("tabh").innerHTML = result.translation;
Sinisa Hajnal
15-Dec-17 8:45am
View
What do you need to save? The code you're showing gets some data from the database (assuming your attendance.SelectedItem.Value holds correct command (valid SQL query, stored procedure call or otherwise is valid for executeReader)
Sinisa Hajnal
15-Dec-17 8:41am
View
So...what is the problem?
Sinisa Hajnal
15-Dec-17 8:38am
View
1st option: make another look and sum content of .Cells(i, 6) (the ones in which you put formula earlier); you may need to keep their identifiers in a collection or an array
2nd option: add variable in the code, sum the results of summary cells and just put the final value into some final cell (no formula that way)
Sinisa Hajnal
5-Dec-17 5:08am
View
You really shouldn't change default behaviour of the back button, it leads to bad user experience and they are less likely to return to your site if you make them work to leave. I say, abandon the idea.
Sinisa Hajnal
4-Dec-17 8:01am
View
Check that you close/dispose all elements/files, unbind all events etc...after finishing the scan. Additionally, check for access or deletion of already opened files...other than that, we cannot debug for you, find the emulator and get to work. Good luck!
Sinisa Hajnal
4-Dec-17 7:57am
View
Google it. You'll find plenty examples. And there is MS Docs too.
Sinisa Hajnal
4-Dec-17 7:56am
View
What action initiates the data retreival? If you use button click, for submit or some other way that initializes postback, you need to prevent default behaviour by calling e.preventDefault, returning false and something with bubbleEvent (for IE only).
Sinisa Hajnal
4-Dec-17 3:02am
View
Don't focus on grids, change the underlying datasource and assign it to that final grid.
Sinisa Hajnal
1-Dec-17 3:01am
View
You're not generating 1-20. Other than that, code looks fine. If you need unique numbers you need an array to check for already picked numbers and need to change the loop from fixed number to while.
Sinisa Hajnal
1-Dec-17 2:59am
View
Make stored procedures for various tasks they need to do. Give them execute rights on those. Make an app that uses them OR give them database query tool of your choice. Teach them how to use those stored procedures. Good luck!
Sinisa Hajnal
1-Dec-17 2:53am
View
Since your columns are of different lengths, you cannot use tab as separator (fixed length separator). Instead, determine the longest text in each column and set that + 1 space (or whatever number of spaces fits your case). You need to pad all other strings to that max length + spaces and then concatenate them.
Sinisa Hajnal
30-Nov-17 7:11am
View
Ask their support - they are very good (in my XP some years ago)
Sinisa Hajnal
30-Nov-17 7:08am
View
It seems you already did with collection of items in PurchaseOrder. What you need and is not visible in the code above is PurchaseOrderId in the item class
Sinisa Hajnal
30-Nov-17 6:48am
View
Google it? Is it even possible?
Sinisa Hajnal
30-Nov-17 6:37am
View
Your regex looks for denq + number, if you add dot after /d it will look for denq + number + anything else behind it. That should cover denq5a and similar.
Disclamer: I am by no means an expert on regex and I avoid them wherever possible
Sinisa Hajnal
30-Nov-17 6:34am
View
No one can help you with something like this. I'd say the configuration isn't quite the same, but what is your particular problem no one can say but you. Maybe your datasource isn't the same on the servers? One with old version of that lacks the field in question?
Sinisa Hajnal
30-Nov-17 6:30am
View
You catch exception as early as you can and log it (in this case in DAL). In case you need to inform the user, you bubble the exception up to UI (AFTER logging it). UI should catch the exception and show suitable user friendly error. You could for example log original error in DAL, catch the exception again in business logic and create ApplicationException with custom (and maybe localized ) error message. Finally, you catch it in UI and show the message to the user
Sinisa Hajnal
30-Nov-17 6:26am
View
Change the perspective, don't think how to change the grids, instead change data sources (copy DataTable or fill another DataSet, collection, whatever you use).
You didn't show any code, not even filling the first grid, it is hard to help like this.
Sinisa Hajnal
30-Nov-17 6:05am
View
You should put your connection string into configuration file and encrypt it.
Furthermore, you should NEVER EVER concatenate user input into your SQL. Use prepared statements or stored procedures (SQL Injection)
Imagine entering username (without square brackets): ['; DROP TABLE USRMST_USERLOGID; --]
Sinisa Hajnal
28-Nov-17 3:39am
View
Final year. Do some research, write the code and in the case you really get stuck post the question here. Asking the boards to write the whole project for you will get you downvoted quickly. You can find many of the patrons here on various free lancer platforms where you can pay for the work done. But you shouldn't - you're shooting yourself in the foot if you don't make the effort to do it with as little help as possible.
Sinisa Hajnal
28-Nov-17 3:36am
View
Consider changing RegistrationModel concrete class to interface (IModel or IRegistrationModel depending on how you want to use it) - that way you can create mock data for testing and decouple your IRegistration interface from concrete model class.
Sinisa Hajnal
28-Nov-17 3:31am
View
As the error say: your credentials don't have access rights. Resolve that and the error will go away.
Sinisa Hajnal
28-Nov-17 3:30am
View
jQuery is open source, take the function you need from the source file and use that instead of jQuery --> you may need to follow dependencies through multiple functions. Good luck
Sinisa Hajnal
27-Nov-17 5:58am
View
add error handler into ajax call and see what happens
Sinisa Hajnal
24-Nov-17 7:52am
View
If I remember my javascript correctly, you need to create enclosure, function with the same name within as the constructor and call the resultant object immediately. I need to look for exact syntax. If you don't find it yourself, reply to this comment and I'll post it in a solution.
Sinisa Hajnal
21-Nov-17 12:08pm
View
Yes, you could. If you knew C# you wouldn't need to ask such question. Thus, you probably wouldn't understand it. I suggest you start with something smaller. Or pay someone to do it.
Sinisa Hajnal
21-Nov-17 11:58am
View
This one wouldn't work because ID will get mangled by the server.
Sinisa Hajnal
21-Nov-17 10:57am
View
Do you know how to make ship of 2 or 3 squares? What's the difference with 5?
Sinisa Hajnal
21-Nov-17 2:41am
View
Any reason why you don't use database, XML or JSON for the storage? Last two are both text files, but structured and supported by .NET so you don't have to write your own parsing logic.
Solution: loop through your directories, loop through the files, read the current file, parse it into the table/collection/grid.
If there is a problem with any of the steps above, ask.
Sinisa Hajnal
21-Nov-17 2:37am
View
You get errors? How do you define "good" best result?
Sinisa Hajnal
21-Nov-17 2:35am
View
Please do some reading and return with concrete question, not general "help me start" request.
Sinisa Hajnal
21-Nov-17 2:34am
View
You're adding new row in this code. Do you need to add the value to different rows? If so, which ones? If not, please clarify what you're trying to accomplish. Do you get errors in the code above?
Sinisa Hajnal
20-Nov-17 5:21am
View
Try .SelectNodes("//data") --> it will give you total count of data nodes anywhere in the document (i.e. not only those directly under the root)
Sinisa Hajnal
20-Nov-17 5:17am
View
Google it.
Sinisa Hajnal
20-Nov-17 5:16am
View
Put a try catch around the block and get concrete error. My guess would be your if values aren't set.
Sinisa Hajnal
20-Nov-17 5:13am
View
What exactly is the problem? If you remove IMEX=1 what error do you get?
Sinisa Hajnal
20-Nov-17 5:12am
View
There has to be an event SelectedItemChanged or SelectedIndexChanged or some such - just read through the documentation.
Sinisa Hajnal
17-Nov-17 11:26am
View
1. Put something into catch block - the way you did it you just swallow the exception and that is why you don't get the error. It would be better to NOT have try catch than to have empty catch block
2. use finally and dispose of any connection, transaction and other disposables.
3. learn to use breakpoints and debug
Sinisa Hajnal
17-Nov-17 11:22am
View
It looks like it executes it once, but it actually runs 8 times. It is just that it does the same thing (scrollTo (0, 1); scrollTo(0,2) etc..maybe it's too fast or the step is too small. Try using scrollamount variable in the loop instead of 8
Add console.log ("loop: " +i); after sleep just to see it runs properly.
Sinisa Hajnal
17-Nov-17 11:12am
View
What is the error? Can't you find and correct the cause based on that?
Sinisa Hajnal
11-Nov-17 15:34pm
View
Put current user name into the session and compare on row binding. Add role checking and you're done. Admin will have right regardless of the user name and particular user will get his edit on his own rows.
Sinisa Hajnal
11-Nov-17 15:31pm
View
You should add more details to the question. What error? What doesn't work? Also, you should take all spellings into consideration. Or offer Y/N y/n
Sinisa Hajnal
11-Nov-17 15:29pm
View
First of all, you should NEVER paste user input to database query. Google SQL Injection for details.
The error may come from lack of spacing between count(*)from...other than that, is there a schema in Access? Finally, I'd use SQL Express rather than Access :)
Sinisa Hajnal
11-Nov-17 15:23pm
View
Is your computer running IIS 6? Maybe it's a matter of versioning? You need Crystal reports that can run on that IIS
Sinisa Hajnal
11-Nov-17 15:13pm
View
You obviously know how to use Session, why is it so hard to pass the value? You may need to add separator to your string or you'll gete id=4Image=4Price=4 (and you're using the same parameter for all three parts)
What is the problem?
Sinisa Hajnal
11-Nov-17 15:04pm
View
As you said, it is your task. Ask the question, don't give the task to others. OriginalGriff wrote good suggestions, heed them and return to ask the questions.
Sinisa Hajnal
11-Nov-17 15:01pm
View
Write the question, don't just put the link. It could be click bait or whatever. And this is not the forum for "I don't know how to start" questions. Vote 1
Sinisa Hajnal
9-Nov-17 6:14am
View
1000 files is not too much on any reasonable system. Focus on the rest of the functionality.
Sinisa Hajnal
9-Nov-17 6:11am
View
Ask specific questions if you cannot convert something. In general, you need to rewrite it, but with advanced conversions available in C# you might avoid rewriting parts of it.
Sinisa Hajnal
9-Nov-17 5:46am
View
Close the question if it is answered. Thank you
Sinisa Hajnal
26-Oct-17 11:20am
View
Show the code. Close AND DISPOSE the connection. Same for transactions and any other disposeable objects you use. Set datatables to null after you're done with them...etc...
Sinisa Hajnal
26-Oct-17 11:17am
View
Why not make checkbox list instead?
Sinisa Hajnal
26-Oct-17 11:15am
View
Your Requested URL is missing hmwssb part from the link above.
Sinisa Hajnal
26-Oct-17 11:14am
View
Usually, you get certain type of response back (HttpResponse or similar). Read the documentation, check the examples and try it. Then come back here if you don't succeed and show the code you tried in What I have tried.
Sinisa Hajnal
26-Oct-17 11:12am
View
FIRST AND FOREMOST: NEVER TRUST USER INPUT. Google SQL Injection...or try to enter into your textbox the following text (without brackets): [ '; DROP TABLE ADMISSION; -- ]
Second, you got the reader, that doesn't mean you can get the variable filled automatically, you need to rd.GetString or whatever the type of ID is. Google it, it should be faster than you waiting for an answer here. Do some work yourself before asking.
Sinisa Hajnal
18-Aug-17 3:54am
View
You shouldn't select neighboring cells, but a direction. After that, you simply go X times in selected direction where X = dimension of the ship -1 (since you already have initial cell). Don't forget to check for collisions :)
Sinisa Hajnal
18-Aug-17 3:52am
View
Exclude control keys from your event so it doesn't call SearchText when you press Ctrl, Tab, Alt or whatever. Might help. I admit I'm not an expert on html events, if onkeypress already ignores those, ignore this comment :)
Sinisa Hajnal
18-Aug-17 3:50am
View
Find which part of dojo handles row selection and override that behaviour. Good luck.
Sinisa Hajnal
18-Aug-17 3:49am
View
You don't have defined parameter @name in your query. Correct it and it should work. It will also save you from SQL injection - you should NEVER add text from the user directly into the query.
Sinisa Hajnal
10-Aug-17 8:47am
View
If there was a way I would upvote all three comments. :) good work Richard!
Original poster: stop immediately or you'll make the system that will be wide open to all sorts of hacks and damage. Read offered links and start over.
Sinisa Hajnal
10-Aug-17 8:43am
View
You send parameters to the procedure that retrieves your data and report is blindly showing whatever it gets from the data source. Crystal Reports are not friendly enough to waste time getting filters to work on the page.
Sinisa Hajnal
10-Aug-17 8:41am
View
What kind of business request is that?
Anyhow, if you manage to get window handle, you should be able to affect the fields on the form. But not by C# code, but 'black magic' as you said
Sinisa Hajnal
10-Aug-17 8:39am
View
Cannot access the images. In general, it is bad practice to have random links on the forum as people tend to be wary of unknown sources.
Sinisa Hajnal
10-Aug-17 8:35am
View
You shouldn't have any IDs in the template - ID should be unique for the page.
Also, you should search by ID directly (it is fastest DOM lookup) - not use constructs like "th input[id='CheckBox2']".
Finally, as a good practice, teach yourself to name all the controls meaningful names. CheckBox2 means nothing to no one (including yourself in a month or two)
Good luck
Sinisa Hajnal
10-Aug-17 8:34am
View
Remove inline styling and create your own CSS file that you will include in the project. To check 'breakpoints' in style sheets, resize the window slowly and see when (if) it reacts to size change
Sinisa Hajnal
19-Apr-17 6:23am
View
Check the database values, if they contain the value, your getter doesn't work as it should. If it doesn't, then your storing part doesn't work. After you find WHERE the problem is, you can check WHY it doesn't work.
Sinisa Hajnal
19-Apr-17 6:21am
View
Please ask the question - you're using some validation already, but not saying what is wrong, what error do you get or what you're expecting
Sinisa Hajnal
19-Apr-17 6:18am
View
The query looks fine, it must be something with variables you send. So, first, check that you're really setting those variables in the code. Don't assume you do, check it. Next, post the code in question - you ask what is the problem with the code and then don't post it.
Sinisa Hajnal
19-Apr-17 6:16am
View
Just from reading the code (didn't check):
Because GetType will return the class type and DBOperations contains UpdateDB.
If you try objIReadOnly.UpdateDB it should fail, but calling from the object instance, you get access from the class not from the interface.
Sinisa Hajnal
19-Apr-17 6:13am
View
Check the gridview for that course ID? You shouldn't go to the server for such basic validation. You should, of course, validate again on the server, but the check for user message should be client-side
Sinisa Hajnal
14-Apr-17 7:31am
View
If MSProjectApp.ActiveProject is empty, so will be your curProject. Why not set curProject to proj variable (i.e. projApp.ActiveProject)?
Sinisa Hajnal
14-Apr-17 7:28am
View
It is good approach and it IS generic. You will never be able to cover natural language in full by regex. But if you separate different cases, you will make it more readable and easily recognizable for any future developer. One other option is to use Microsoft Luis (or any other bot) that can be trained on sentence templates.
Sinisa Hajnal
14-Apr-17 7:26am
View
Do you use ready handler? Maybe the button is not created at the moment the script runs?
Sinisa Hajnal
27-Jan-17 7:26am
View
Or you could set some default End Date (31.12.2999) in case where your users don't supply one. You then ignore it and send null to the database. This is alternative that allows you to use "normal" non-nullable type if it is important for something else in your project (not likely, but still).
Sinisa Hajnal
27-Jan-17 7:23am
View
Generally, you load json into objects and then use object structure. There are tree controls you can easily find online.
Sinisa Hajnal
27-Jan-17 7:21am
View
As others said, profile it.
Not relevant to the question, but advice: use try..catch..finally to close and dispose connection object. In the case of an exception your connection will stay in the memory.
Sinisa Hajnal
27-Jan-17 7:18am
View
Open the button, find the style (css classes) that applies to it and add your own
Sinisa Hajnal
23-Jan-17 4:08am
View
What have you tried?
Sinisa Hajnal
23-Jan-17 4:06am
View
Clear the original list on button click. That way, when you get the data back you'll have clear table to fill out.
Sinisa Hajnal
17-Jan-17 8:46am
View
IF its only data storage that needs to be on the cloud (as implied by your question), think about the cloud as remote database. That is all, you don't have to change anything in the application except Data Access Layer by adding new Repository type. For details, you will have to consult google API documentation.
Sinisa Hajnal
17-Jan-17 8:43am
View
As you already noted, it is not possible in window calendar. BUT! You could try extending the control and doing your own drawing by overriding OnPaint event. Hard, but doable. Other than that, look for third party components, don't ask others to search for you.
Sinisa Hajnal
17-Jan-17 8:40am
View
Why don't you use checkboxes? It seems more natural that way
Sinisa Hajnal
16-Nov-16 3:18am
View
Please use Improve question and move this code into the question itself. Thank you.
Sinisa Hajnal
16-Nov-16 3:16am
View
You don't really have to save original page and do everything from the start. Just rebind datepickers in printDiv method.
Sinisa Hajnal
16-Nov-16 3:12am
View
Except in cases where the structure of the language creates difference in concatenation (i.e. if you have word1 name word2, you cannot concatenate like english.
Sinisa Hajnal
16-Nov-16 3:10am
View
You do the concatenation in the same way. What you need to change is page language and page language direction so that your string will automatically render from the right.
Sinisa Hajnal
16-Nov-16 3:07am
View
And you also resolved it quite nice with double for loop. I personally would do inner loop in stored procedure with ID, start date and end date as parameters.
Sinisa Hajnal
15-Nov-16 6:35am
View
When you submit the form, the page is refreshed (and thus, the timer is refreshed). Instead of timed submit, use ajax call to refresh/save/do whatever else you need without doing full postback.
Alternatively, set current time into a variable and set the page starting value to that on the server side.
Sinisa Hajnal
15-Nov-16 6:34am
View
Think of that service as another form or method of another class. How would you pass the data to the method? By using parameters. If you have no control over given web service, you can only use methods it publishes in the form it publishes (i.e. no adding parameters). If you're creating that service, just add the parameter you need.
Sinisa Hajnal
15-Nov-16 6:24am
View
Either have those headers added to your HTML or use one of many reporting tools and create report that will take the data without any need for html formatting. CrystalReports, FastReports, MS Report Builder and others are easily available.
Sinisa Hajnal
4-Nov-16 8:27am
View
Use parametrized query and send UTC formatted data as parameters. Or use stored procedure and send datetime parameters directly. I commonly use UTC dates simply because I know what I'm sending and how I'm transforming it in the stored procedure (helps with compatibility)
Sinisa Hajnal
4-Nov-16 3:47am
View
You could loop through all columns and remove / replace column header text. You cannot remove them completely because headers are datatable object property. It is probably possible with some reflection, but why bother?
If you mean you need to remove header from excel it is much simpler. Just remove first row from the datatable.
Sinisa Hajnal
4-Nov-16 3:44am
View
instead of if-else...use just if with negation since you don't have anything in "true" branch.
As for keeping values between refreshes, use session to store that info.
Sinisa Hajnal
4-Nov-16 3:41am
View
While newer version commonly can open old version files, the reverse in not true. You should try and open the file in Excel 2007 it will tell you if the new file format is supported. If not, you need to save the file in older format.
Sinisa Hajnal
7-Oct-16 4:22am
View
It seems fine, what is the problem here? Besides the fact that you send (and keep) the password in parameter / table :)
Sinisa Hajnal
7-Oct-16 4:19am
View
Check the properties of interop object you use. There should be one defining the separator.
Sinisa Hajnal
7-Oct-16 4:18am
View
Please mark this as answered or delete it.
Sinisa Hajnal
7-Oct-16 4:17am
View
Sounds like you're on the right track, using ajax. Now just learn to handle the result and add / change what you need on the page.
Sinisa Hajnal
7-Oct-16 4:15am
View
IF this is web development (as implied by Page load) then you need to call dataGridView1.DataBind()
If it is not (as implied by use of DataGridView) then you need to do form load not page load event.
Also, you should never EVER add user input value to your SQL.
Sinisa Hajnal
3-Oct-16 7:41am
View
You create suitable dictionary, ideally with context information so you don't show everything always. Then you just show what's needed at the typing point.
Check the code jQuery autocomplete for some ideas.
Sinisa Hajnal
3-Oct-16 7:24am
View
What happens when you call the code? Do you get error with insert, the code passes without error, but doesn't insert data? What?
Set the breakpoint in Send methods and see what happens, what parameter values are you sending...also check the procedure with the same parameter values in Query analyzer.
Also, don't use Throw Ex, if you don't do any logging or anything, why catch it at all. If you just want to pass original exception and have catch block, write "throw;" not throw Ex. The reason: throw Ex will set your error line to that block not to the original exceptions position.
Sinisa Hajnal
3-Oct-16 7:18am
View
How do you bind other properties? I.e. if you use Item.BandName, same should work for Item.Id. <== note that this means that your Id field holds songId and not bandId or some other Id value.
I'm not sure that I understand the problem. Is it that Id doesn't get written to SongId parameter or that your DetailsView cannot see/parse the parameter?
Sinisa Hajnal
3-Oct-16 7:06am
View
Change the query. Write stored procedure that will return exactly the data you need in a format you need it. Database knows how to work with big sets of data. Code uses loops which are slow and inefficient for this kind of tasks. Esp. since you have several loops both explicit and implicit through linq.
Sinisa Hajnal
3-Oct-16 7:01am
View
SO, you need to get the data (emails) from the database and use that? In C#? And you cannot be bothered to find decent example of data retrieval of which there are thousands? 1 vote.
Sinisa Hajnal
3-Oct-16 4:26am
View
You could try to split the file into several related files and run import threads in parallel?
Sinisa Hajnal
3-Oct-16 3:29am
View
I've looked at the fiddle on both IE 11 and Chrome. And it works smoothly. I've run the fiddle multiple times.
Sinisa Hajnal
27-Sep-16 9:26am
View
Check any application you use regularly. You'll see an exe file and bunch of various other files. Those are your "code behind" and control library files. You have to compile them and distribute them along with your application.
Better practice is to have it in separate library and not within application code so you could deploy new version of the control without affecting main app.
Sinisa Hajnal
27-Sep-16 9:24am
View
insert % between any two words in searchterm that is not surrounded by quotes. Thus, for spine injection you would get %spine%injection% and you need the reverse too
%injection%spine%
If they are grouped together by quotes "spine injection" then you seek that whole term.
You could also look at NEAR clause in SQL server https://msdn.microsoft.com/en-us/library/ms142568.aspx and see if that helps
Sinisa Hajnal
27-Sep-16 9:21am
View
each of the counts will be the same, it doesn't count separate values by the column. You could write count(1) and it would still give you same number.
You have to use subselects to count each separately. If you use SQL server, you could use CTE in stored procedure. Probably each major database has the equivalent, but I don't know them.
Or return all values and count separately on the client side (which would be worse option)
Sinisa Hajnal
27-Sep-16 9:15am
View
Try installing log4net on the server. Probably just some assembly needing GAC registering.
Sinisa Hajnal
26-Sep-16 9:43am
View
You need to remove direct concatenation of user input into your SQL. And that should be your first priority. Other than that, the code looks correct (assuming the stars are here to protect your password from us and not really sent to the server :) )
Sinisa Hajnal
26-Sep-16 9:42am
View
You don't. It is javascript function and you call it from the client. That is, you register it server side (as you do in the above code) and then call it wherever you need it on the client.
Show More