16,002,236 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 .NET 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 Martin Arapovic (Top 66 by date)
Martin Arapovic
5-Oct-12 6:19am
View
Yes it is and I wrote that you need to call SaveChanges which means it can't be done without saving changes. As I know, object is inserted when SaveChanges method is executed, not before!!!
Martin Arapovic
6-Sep-12 15:46pm
View
Problem can occur because of many things.
I suggest you to turn on trace for your wcf srevice and then using Service trace Viewer tool to check if there is any exception inside WCF infrastructure. It's easy and all things are done in service web.config file. How to turn WCF tracing search on google. Use Service Trace Viewer Tool to analyze trace.
One more thing. I see you are trying to send some file, so try to change transferMode="StreamedResponse" within your binding configuration and make sure that your service and client have the same configuration (bindings and so on).
Important note: As I remember, WCF streaming was not supported by the ASP.NET Development Server, so make sure that you deploy your service to IIS or host it inside your test app, before making any tests.
Martin Arapovic
3-Sep-12 19:05pm
View
Hi, I think that your problem/exception is related to datetime string format! Basically, LINQToSQL provider is getting tripped with it while trying to translate it into SQL when linq command is going to be executed. Above example is written without test and as I can see the easiest solution is to fetch datetime values into list and then do formatting in a second projection... I'll update example with code that should do the trick... :)
Martin Arapovic
21-Aug-12 8:50am
View
Hi, You have all code posted here within answer. You only need to create empty aspx page, download/add ajaxcontroltoolkit as reference and paste markup code into page and javascript code in head of your aspx page. If you can't get it to work, contact me by email martinarapovic(at)gmail.com and I'll sent you working example...
Martin Arapovic
20-Jun-12 8:54am
View
Hi, I just want to add a comment/suggestion. For things like this in your question i suggest you to use some js framework/library, like jQuery, prototype, mootools. Using them to select and manipulate DOM elements on page, your code will work in all browsers, because they are taking care of the browser and its version...
Martin Arapovic
12-Mar-12 14:53pm
View
...and in for loops instead "," ";" needs to be used... Syntax is incorrect...
Martin Arapovic
5-Mar-12 13:36pm
View
Hi! What's your problem? Where you want to put your split-ed string? What Table? DataTable, Database table? Split string is pretty easy... Check my general solution used to split string...
Martin Arapovic
4-Mar-12 7:57am
View
Hi! Can you provide little more info. What you use to load data into grid (what is the data source), do you use Ajax (update panel or some other implementation...), do you page your data?
It looks that your data from server to the client can be transferred within given amount of time. Try to set ScriptManager AsyncPostBackTimeout property to desired value if you use script manager... This is what I can try to guess. With more details you will get better answer. :-(
Martin Arapovic
25-Feb-12 15:20pm
View
Hi, don't ask the same question twice. You can edit your question if you want to add something to it... ;)
Martin Arapovic
25-Feb-12 8:10am
View
Hi, there is an error in my code, p4 parameter didn't have value assigned! I posted code as concept and you shoud review it before use...
Martin Arapovic
24-Feb-12 4:32am
View
Hi! What error it gives you back?! Install firebug and check error in console. It seams that you have some errors related to CORS (http://en.wikipedia.org/wiki/Cross-origin_resource_sharing) and different domains...
[EDIT]
One more thing. Set your dataType to jsonp and make sure that you are using GET method and in your service method make sure that you return data in jsonp format. Example: callbackFunction({"Your pson reponse here"});
Use google if you need more info about stuff that i wrote in comment... :) Good luck..
Martin Arapovic
23-Feb-12 14:35pm
View
Hi,
Can you post some code, so we can try to see whats wrong?! The common problem here is that controls are didn't created at right place within page life-cycle. Try to create yours controls within Page_Init handler because viewstate is loaded in Pre_Load handler which happens before Page_Load and ensure that controls have ID defined...
This is only my lucky guess. :)
Martin Arapovic
23-Feb-12 13:54pm
View
Yes, you are right. I fixed that to in my example... :) Tnx...
Martin Arapovic
23-Feb-12 12:55pm
View
I think you can't trace that in access! Not sure, but I think Its impossible...
Problem is with parameters... Check my answer...
Martin Arapovic
23-Feb-12 7:42am
View
Hi,
You can read this book (http://www.amazon.com/Programming-Entity-Framework-Building-Centric/dp/0596807260) and look examples on this site (http://learnentityframework.com/LearnEntityFramework/tutorials/).
Also download LinqPad (http://www.linqpad.net/) for easier and faster testing...
And there is google also if you need more information regarding something specific... :)
Martin Arapovic
23-Feb-12 2:21am
View
Hi, I don't know your data model, but "Account" must be property on your BoardPost and all must work.
Actually, as I can see you can remove "result.Account = post.Account;" line because your method is returning BoardPost object and you included "Account" in your query and "Account" will be already loaded with BoardPost.
Martin Arapovic
23-Feb-12 2:16am
View
Maybe I didn't understood you well, but you need to change your bound filed with hyperlink filed and that's all.
Martin Arapovic
22-Feb-12 14:52pm
View
Yes, I saw that and because of that I put new link in this answer... :)
Tnx...
Martin Arapovic
22-Feb-12 12:15pm
View
Please post your exception details...
Martin Arapovic
22-Feb-12 12:12pm
View
Hi,
You can use cache anywhere in code. In your handler add your object (image or whatever it is) in Cache using Cache.Add() or Cache.Insert() method. Then in your code where you want to use image you can get it from cache like an item from any key/value collection by key name: Image myImage = (Image)Cache["MyImage"];. Look this question on stackoverflow http://stackoverflow.com/questions/1669975/caching-http-handler-ashx-output
Martin Arapovic
21-Feb-12 11:16am
View
Yes, maybe its is the security issue, but maybe your EventLog Source does not exists... Check if event log source exists before writing EventLog. Use EventLog.SourceExists("YourSource") method to check if your source exists. If it does then just write else create a new with desired name...
Martin Arapovic
21-Feb-12 11:06am
View
Hi,
You didn't mentioned what database you use, but I will suppose that you are using SQL Server. First thing that is on my mind is row versioning. You can handle Optimistic Concurrency Exception and that way you can detect that row/record is changed...
Just add one more column (TimeStamp or RowVeriosn data type) in your table and you can test this. If you want more details just google and you will find many articles bout this topic...
Martin Arapovic
12-Feb-12 4:45am
View
Hi, I think that you didn't read article from my first link. There you have all you need...
Sorry but it must work, because I done this a hundred times I think... :)
First mistake is to use server side ID's ("Button1" from your example). Button1 on client have different name.
You should write this in your js code: function Button2_onclick() { __doPostBack('<% Button1.UniqueID %>', ''); }
or you should use some page protected variable and Page.ClientScript.GetPostBackEventReference method like the article from from my first link says...
Martin Arapovic
10-Feb-12 14:06pm
View
Hi,
Try to google preload images or somthing. I think that I saw a solution for this using jquery...
Martin Arapovic
10-Feb-12 12:49pm
View
Just to add something. Why hold Logged in user in seesion when you have asp.net membership classes. Example: MembershipUser membershipUser = Membership.GetUser(); That way you always can get user if you are using asp.net membership provider. Saving value into database is simple as one simple google search...
Martin Arapovic
9-Feb-12 11:32am
View
If you can't make your jquery to work, update your question with your generated html and we will try to make your jquery selector to work...
Martin Arapovic
9-Feb-12 11:30am
View
Yes it is! ClientIDMode="Static" will do the job, but using ClientIDMode="Predictable", not exaclty. Generated Id will have NamingContainer name as prefix I think. The good thing is that, if you use jquery (javascript) a lot, ClientIDMode can be controlled at page (in page declerative) or global level (web.config pages section)...
Martin Arapovic
9-Feb-12 4:18am
View
Yes! That is the right way to use jquery with asp.net server controls.ClientId can also be set explicitly if asp.net 4.0 or higher is used... :)
Martin Arapovic
7-Feb-12 10:52am
View
Hi! This si pretty simple! Debug your code or use sql server profiler to see what command you execute against db or update your question with code that is used to build that command!
Martin Arapovic
7-Feb-12 6:37am
View
Hi, not clear enough... Sorry...
But if you need design for Log-In page then search internet... When you find it it will be some license info about artwork and its distribution/usage...
Martin Arapovic
6-Feb-12 12:51pm
View
Give us more details. If you want import and export database, just detach it, copy and attach to another sql server instance.
You can also make database backup and the you can restore that backup file to another sql instance. YOu can also use Export/Import wizard (http://msdn.microsoft.com/en-us/library/ms140052.aspx) which comes with SQL Server and export/import data using any provided format...
Martin Arapovic
6-Feb-12 12:43pm
View
Can you give us site url where you found that "expert" menu?
Martin Arapovic
6-Feb-12 12:36pm
View
Just to add something. If it is not crucial for you, client time can be shown in browser using java script.
Martin Arapovic
6-Feb-12 10:28am
View
hi, I just try solution this solution http://www.codeproject.com/Articles/37103/Customizing-User-Controls-with-Smart-Tag-Feature and it is working, so compare it with you code and see what you are missing.
Martin Arapovic
6-Feb-12 9:45am
View
How you mean grid view is slower? I think that it's pretty much the same thing.
If you need to use HtmlTable the you need to query your data and build your table dynamically.
GridView works on the same way, and gives you more features (Sorting, Paging, CSS formatting is easier...) then simple HTMLtable.
Martin Arapovic
6-Feb-12 9:44am
View
Deleted
Replay to wrong message... :)
Martin Arapovic
6-Feb-12 8:10am
View
If you want to do that on client side with javascript our both solutions are the way you need to follow, but if you want to do that on server side, use autopostabck = "true" and handle business logic in code behind... But, my sugestion is to use client side without necessary postbacks! Anyway, decision is yours. Good luck...
Martin Arapovic
6-Feb-12 7:12am
View
I agree with you...
Martin Arapovic
6-Feb-12 7:11am
View
Generally this will work on windows prior win server 2008 and 2008R2. And if he have dedicated server used to host this, because he must have access to windows scheduling service, which i doubt he have. Better solution is to use some stand alone solution like Quartz.NET...
Martin Arapovic
6-Feb-12 5:57am
View
Yes, thats it! Using format strings is right solution.
5!
Martin Arapovic
6-Feb-12 2:07am
View
Hi! You can't call javascript when gridview or datalist are bounded. Javascript is executed on client and there is nothing to do with server-side processing. You must call it on page load, some control click, onmouseover, keypress or any other event that fits your needs. So if you want to change coors of these spans best way is to chage it on dom.ready or do that on server side while you binding gridview. Look GridView OnRowDataBoundEvent for example...
Martin Arapovic
5-Feb-12 16:05pm
View
Good links for people that doesn't understand principles of reusable object-oriented design or OOP desing in general.
Martin Arapovic
5-Feb-12 15:53pm
View
Ok! Tnx...
Martin Arapovic
5-Feb-12 14:30pm
View
Hi,
Problem is probably with your css. use firebug or IEDeveloper toolbar and check what's making you such problem. We can't help you without any code provided.
Martin Arapovic
4-Feb-12 17:14pm
View
Yes! You are right. tnx! :)
Martin Arapovic
4-Feb-12 17:08pm
View
Hi! And this needs to be written in what language?!
Martin Arapovic
4-Feb-12 16:41pm
View
I noticed, that in question you said that you have "r_image" in xml, but in your markup code you have "r_imge"...
Maybe that's the mistake, but I think that you should get exception if you call Eval function with argument that doesn't exists in data source...
Martin Arapovic
4-Feb-12 15:28pm
View
Hi, You can try to set readerQuotas properties of used binding! Set all of them to the max values just to be sure! I may help but i thin the real problem is in the service...
Martin Arapovic
4-Feb-12 9:14am
View
Did you try to remove compilation element from web.config? Backup curent web.config, remove compilation element and then try.
Martin Arapovic
4-Feb-12 8:24am
View
Hi,
Show us your markup code. From your question we can't figure out what do you exactly what and we can't help you...
Martin Arapovic
4-Feb-12 7:02am
View
Hm!!!
If your database is writable. Connect to it using SSMS tool and use sql user credentials that you are using through your code in ConnectionString and then try to insert something. If that is working then your code must work also...
This error remind me to old times when I was using access :) This is very strange that this error appears with sql server db if database is not read-only and user that is used can make changes to the database.
Martin Arapovic
4-Feb-12 6:21am
View
Hi!
Why you are doing that? That does not make any sense. Web method cant show alert. It must do some program logic and return some value if that is needed. :) Maybe I'm wrong but you need to change your concept. You need to return score value to the client and then he will do something with score value...
Martin Arapovic
4-Feb-12 3:54am
View
Hi! If the service is provided by the microsoft then you can tell us what and where we can find that service so we can try to run it! Trace must work if you done all steps written on given sites.
Martin Arapovic
3-Feb-12 13:03pm
View
Hi! There is a solution to that to, but you need to use DynimcLINQ (ExpressionTrees and lambdas). I think you will find solution for your problem on this page. http://landman-code.blogspot.com/2008/11/linq-to-entities-string-based-dynamic.html
This solution is written for LinqToEntities, but I'll update my answer to include methods from given link...
Martin Arapovic
3-Feb-12 12:16pm
View
Maybe now will work. I edited answer because margin top/right properties were wrong... :)
Martin Arapovic
3-Feb-12 12:15pm
View
Hi,
I don't have ie9 on this laptop (Win XP with IE8), so I can't see whats happening. You can try to validate your css using css validator (http://jigsaw.w3.org/css-validator/#validate_by_input) and then you will see what is wrong.
You can use http://jsfiddle.net/qEPta/ to test your code online.
One more problem can be usage of css3 properties, which are not or partially suported in ie9. Sorry if i didn't helped you. :-(
Martin Arapovic
3-Feb-12 11:35am
View
Thx...
I don't like people that are destructive! He could give right answer to the question and then review my answer. That would be the right way and then we all can learn something from "expert". :)
Martin Arapovic
3-Feb-12 1:17am
View
Yes they should go, but i wanted to write simple example thta fits user question.
And one more thing about your vote! I don't care about votes and points! I just tried to help. So, you sholud do the same thing.
Martin Arapovic
3-Feb-12 1:08am
View
Well "innerclass" in my example is child class. Two classes from example are created to fit the problem.
Martin Arapovic
2-Feb-12 2:36am
View
Ok,
I'll make solution for VS2008 and sent it to you again, but I think if you make empty ASP.NET WebApp, add reference to AjaxControlToolkit dll and copy page content to your new page in solution, all should work...
Martin Arapovic
1-Feb-12 8:15am
View
I'll sent you a working solution on mail...
Check mail in about 15 mins....
Martin Arapovic
1-Feb-12 4:24am
View
Yes, I forget to add that. Tag prefix declaration must be added in page or in web.config. :)
Martin Arapovic
5-Feb-11 6:19am
View
I can see two solutions for this:
1. You can add TOP 5 to oledb command and get only first 5 rows.
2. When you return data set with one table from excel sheet using example that Abhinav posted, you can select desired number of records using LINQ;
Example 1: "DataTable".AsEnumerable().Take(5);
Example 2: "DataTable".Rows.Cast<datarow>().Take(n);
This is only example and maybe there is syntax error, but I think you will understand what I'm talking about.
Martin Arapovic
21-Jan-11 8:01am
View
There are also many examples on net for this. Check this
http://dotnetfaqs-edu.blogspot.com/2009/01/add-autonumber-column-in-datagridview.html
http://www.dotnetspark.com/kb/298-auto-generate-row-number-to-datagridview.aspx
Martin Arapovic
21-Jan-11 7:58am
View
Ups, I saw that you are looking for VB.NET Forms application after i click post! Sorry :)
Martin Arapovic
21-Dec-10 10:07am
View
Then something else is the problem, post controls code and page code where you are using them, then we can investigate whats happening. ;)
Show More