16,004,587 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 NaibedyaKar (Top 72 by date)
NaibedyaKar
17-Sep-16 11:11am
View
Awesome!!!
NaibedyaKar
8-Sep-16 6:27am
View
Can you check this
http://forums.asp.net/post/5531588.aspx
NaibedyaKar
8-Sep-16 3:36am
View
I think the application is not able to connect to the database.
NaibedyaKar
8-Sep-16 3:09am
View
I am not sure what kind of data you are showing, but 2 lacs records on a page is a very bad idea. You better look for server side paging to show data.
NaibedyaKar
8-Sep-16 3:01am
View
Can you try with this.
public HttpResponseMessage Get()
{
var results = _productRepository.GetPackCounts();
return Request.CreateResponse(HttpStatusCode.OK, results, new XmlMediaTypeFormatter());
}
NaibedyaKar
8-Sep-16 2:59am
View
Strange!! This is working fine for me..
This is my code.
[Route("api/Products/GetPackCountsTest")]
[HttpGet]
public IHttpActionResult GetPackCountsTest()
{
var products = _productRepository.GetPackCounts();
return Content(HttpStatusCode.OK, products, Configuration.Formatters.XmlFormatter);
}
NaibedyaKar
7-Sep-16 16:15pm
View
I think I understood the requirements and the output that you want. But I got confused when I see the scripts that you provided.
You need the bucket table to have the full capacity as 100, 50 and 70. Also the bucket values should be filled from B1, then B2, then B3. Then why are you inserting values as
insert into dbo.Buckets (fullcapacity,currentamount,BucketID)
select 10, 0, 1
union
select 5, 0, 2
union
select 10, 0, 3
union
select 10, 0, 4
BTW, you can insert multiple rows to table without using unions.
Then where is your 2nd table?
NaibedyaKar
7-Sep-16 9:01am
View
I think you are not inserting rows into the @BrandTable.
NaibedyaKar
7-Sep-16 7:16am
View
Use SELECT @TktId instead of Return @TktId.
NaibedyaKar
7-Sep-16 7:13am
View
Send the the code for new function. What is the error you are getting.
NaibedyaKar
7-Sep-16 7:12am
View
yes, you will have to provide the entire path for your exe. Else how it will know the path :).
Glad that it worked for you.
NaibedyaKar
7-Sep-16 5:59am
View
I have given an example how to do that for webgrid.
You can select the header element of your grid using jquery selectors and append the text to it.
NaibedyaKar
7-Sep-16 4:21am
View
check this link to understand how to return table from UDF
http://www.codeproject.com/Articles/167399/Using-Table-Valued-Functions-in-SQL-Server
NaibedyaKar
6-Sep-16 16:44pm
View
I can give you a an idea how to handle this. I might not provide you the exact UDF code.
Currently as per the above function, we are checking for the angle brackets start and end after that removing the whole string inside it. And then concatenating all those string and returning as a varchar.
You can change the function to return a table.
CREATE FUNCTION [dbo].[udf_StripHTML1] (@HTMLText VARCHAR(MAX))
RETURNS @OutputTable TABLE
(
Brand VARCHAR(255),
Name nvarchar(255)
)
.. . .. . .. . . . .
.. . .. . .. . . . .
And then instead of concatenating the strings, you will have to insert that to the table. So you have to write the logic in such a way that the whole string can be separated at a proper fashion.
NaibedyaKar
6-Sep-16 8:26am
View
Bit not clear on the requirements.
NaibedyaKar
6-Sep-16 7:04am
View
You can use this inside your select query
SELECT Id, dbo.[udf_StripHTML](HTMLColum) FROM TableContainingHTMLData
NaibedyaKar
6-Sep-16 4:09am
View
ok..
STUFF function inserts a string inside another string at any given char index.
So if we will write
<pre lang="SQL">SELECT STUFF('FirstString', 4, 1, 'SecondString'); </pre>
The output will be FirSecondStringtString. This is because, the second string is inserted at the 4th position of the first string and 1 char is removed next to the first string.
Fir + SecondString + tString (s is removed from the first string).
Follow
[
^
]
CHARINDEX, searches a string inside another string and then provides the start position for the found string.
<pre lang="SQL">SELECT CHARINDEX ('string to search', 'Original string to search or test', 0 )</pre>
The output for this will be 10. That means the 'string to search' is found at the 10th position from the 'Original string to search or test'. The 3rd parm is an optional parameter which state, after how many chars we should start searching.
Check more on
CHARINDEX (Transact-SQL)
[
^
]
NaibedyaKar
6-Sep-16 2:30am
View
What do you mean by the source code is imported by SQL.
Can you tell me which lines or keywords from the above function you need explanation.
NaibedyaKar
5-Sep-16 14:36pm
View
Sorry for the late response, I was busy on something else.
You can use IsIconic(instance) to know whether the application is minimised or not. Let me show the whole code as a separate answer.
NaibedyaKar
5-Sep-16 10:55am
View
What error did you get. Did you get error while creating the function or executing the function?
Once you create the UDF, then call it as below
SELECT dbo.[udf_StripHTML] ('<div id="naver">
- <ul id="naverlist">
-- <li class="overbrand" class="navhome">
HOME
</li>
- <li>
Acer
</li>
<li class="navspecial">
Contact Us
</li>
</ul>
</div>') AS OutputText
The code basically checks for the angle brackets start "<" and end ">". After that it removes the text inside this. Thus by removing the html code and just keeping the plain text.
NaibedyaKar
5-Sep-16 8:08am
View
Ohh, ok.
Can you check this link http://stackoverflow.com/questions/9960753/how-to-minimize-restore-a-window-in-c-sharp?answertab=active#tab-top
foreach (Process proc in Process.GetProcesses())
{
if (proc.MainWindowTitle.Contains(p))
{
IntPtr handle = proc.Handle;
Program.WINDOWPLACEMENT wp = new Program.WINDOWPLACEMENT();
Program.GetWindowPlacement(handle, ref wp);
if ((wp.showCmd & 2) == 2)
{
wp.showCmd = 9;
MessageBox.Show("Restoring");
}
else
{
wp.showCmd = 2;
MessageBox.Show("Minimizing");
}
wp.length = Marshal.SizeOf(wp);
Program.SetWindowPlacement(handle, ref wp);
break;
}
}
NaibedyaKar
2-Sep-16 6:33am
View
Why do you want to call the windows application form the web. Can't you do the same thing using the webservice code.
NaibedyaKar
20-Oct-14 7:48am
View
Not able to get your question, can you please be more descriptive.
NaibedyaKar
20-Oct-14 7:37am
View
Just click on "here". Anyway I am providing it below.
http://www.codeproject.com/Articles/1083/Multithreaded-Programming-Using-C
NaibedyaKar
19-Oct-14 12:50pm
View
Then i think that is the issue. I mean is you have applied it on the parent level and child level, the repetation is happening.
NaibedyaKar
18-Oct-14 13:34pm
View
Can you provide some more details of your requirements here. Provide the table structures and the expected output.
NaibedyaKar
18-Oct-14 13:30pm
View
Here is a link which you can follow to create the service.
http://www.codeproject.com/Articles/3990/Simple-Windows-Service-Sample
NaibedyaKar
18-Oct-14 3:44am
View
Good man, cheers
NaibedyaKar
18-Oct-14 3:30am
View
What have tried for this. It is as simple as checking which option of the radio button checked and then sending the email.where is the issue are you facing exactly.
NaibedyaKar
18-Oct-14 3:28am
View
Can you take a look at the below link
http://www.codeproject.com/Tips/403031/Extension-methods-for-finding-centers-of-a-rectang
NaibedyaKar
18-Oct-14 2:24am
View
Ohh yes, Gopu, you are right. My bad.
Sorry Madhuri. Please check ddlGodownName is having the autopostback is set to true or not.
NaibedyaKar
18-Oct-14 2:07am
View
I am happy that I helped you.. But Ryan advice is also correct. Why don't you try to use parameterized queries. Something like mentioned here. Else we can kill your DB server easily :)
http://stackoverflow.com/questions/17509169/parameterized-queries-vs-sql-injection
NaibedyaKar
18-Oct-14 2:02am
View
Hmm, ok. Did you check the data in the table is coming fine?
NaibedyaKar
17-Oct-14 10:25am
View
Not much sure why it happens like that. Can you check if your have applied the key above to this folder.
NaibedyaKar
17-Oct-14 10:23am
View
Well, it is just to help him knowing how to fix the issue.
NaibedyaKar
17-Oct-14 8:30am
View
Your update query is wrong.
NaibedyaKar
17-Oct-14 8:27am
View
Can you tell us what error are you getting and where
NaibedyaKar
17-Oct-14 8:24am
View
Bit confused on your above question. But what I understood is you want to use both no-cache and no-store. For that I think you can add one key as Cache-Control with value no-cache,no-store.
NaibedyaKar
17-Oct-14 8:15am
View
Did you add the fields on the report viewer?
NaibedyaKar
17-Oct-14 5:04am
View
Hi Suresh, did you try with anything that you can post here.
NaibedyaKar
16-Oct-14 13:03pm
View
Did you add the fields to the report viewer properly?
NaibedyaKar
16-Oct-14 10:01am
View
yes, I think you can do that in the same way by adding a new header.
Do you really want to add no-store? Check this http://blogs.atlassian.com/2007/12/cache_control_no_store_considered_harmful/
NaibedyaKar
16-Oct-14 8:35am
View
Yes, it can be applied to all the resources. You can add it at root level or folder level.
NaibedyaKar
16-Oct-14 7:13am
View
Can you check if the excel object is being closed properly. Can you provide you code here.
NaibedyaKar
16-Oct-14 5:24am
View
Well, I think it is some work around, but might not be the best approach.
Can we not use disconnected architecture or something so that we will have all the data in place and no way we have the exceptions. Not sure if it is really a valid.
NaibedyaKar
16-Oct-14 3:58am
View
Why don't you add one condition there to check the database connection before doing any task.
NaibedyaKar
16-Oct-14 3:35am
View
Why do you want to show PDF on Picturebox. How that will help you checking all pages?
NaibedyaKar
16-Oct-14 3:01am
View
Have you tried with something yet?
NaibedyaKar
15-Oct-14 12:28pm
View
Happy that it helped you
NaibedyaKar
15-Oct-14 11:44am
View
Ahh, ok. Good.
NaibedyaKar
15-Oct-14 11:42am
View
I think your application is not given permission to access that path. Can you run your application as an administrator. Right-click on it and select "Run as Administrator". If still not working, let me know. Provide me the path that you are trying access. Change the path and try to access.
NaibedyaKar
15-Oct-14 9:01am
View
We did not get your issues on this. Can you please be more clear.
NaibedyaKar
15-Oct-14 8:59am
View
Do you mean the database is hosted on your machine? If so then the connection will close when you stop the server.
NaibedyaKar
15-Oct-14 8:56am
View
Can you please paste it on a notepad first and then copy from notepad to here. If that would help.
NaibedyaKar
15-Oct-14 8:16am
View
The above code is showing image.Are you sure you provided the correct code snippet here.
NaibedyaKar
15-Oct-14 7:29am
View
What kind of validations you have used? You can also validate the textbox values on serverside code if you want to double sure on the validations.
NaibedyaKar
15-Oct-14 7:27am
View
Do you mean you want to create some unique URLs that can be used once?
NaibedyaKar
15-Oct-14 6:59am
View
I think you can do that by first importing the excel data to datatable or list and then you can play with the list data to export to any format. Hope this makes sense. let me which step you need help.
NaibedyaKar
15-Oct-14 6:36am
View
Nice reply Suraj. But I answered him :(
NaibedyaKar
15-Oct-14 5:24am
View
What do you mean by "according to the page required"
NaibedyaKar
15-Oct-14 4:12am
View
Can you check if you get data in your db if you connect these columns first. I hope you have created the relations in datbase itself before showing that on the report.
NaibedyaKar
15-Oct-14 4:08am
View
It will not affect it as each application will create it's own instance.
NaibedyaKar
15-Oct-14 3:50am
View
Hi Srinivas, I believe I answered the same issue on a different question of yours. You can achieve this by using the windows service. Or you can create a console application to connect DB and call the function/stored procedure. Then you could trigger that console from a windows scheduler.
NaibedyaKar
15-Oct-14 3:37am
View
If you want to use same logging feature on all of your projects, then better to create a separate application and use the assembly on all your projects.
NaibedyaKar
15-Oct-14 2:48am
View
Srinivas, I think you have the answer in the question itself. You can achieve this by using the windows service. Or you can create a console application to connect DB and call the function/stored procedure. Then you could trigger that console from a windows scheduler.
NaibedyaKar
14-Oct-14 11:14am
View
Actually it is very easy to do on html5 canvas. That is what I wanted to say. Anyway if you want to do it without canvas, then you might like to check the below links.
http://www.java2s.com/Tutorial/ASP.NET/0180__Development/GenerateImagepaintstringwithfontanddrawimageC.htm
http://www.codeproject.com/Articles/7462/Dynamically-Write-Text-On-An-Image
NaibedyaKar
14-Oct-14 9:11am
View
The best option for this to work with canvas
NaibedyaKar
14-Oct-14 7:57am
View
You can show validation messages like here http://www.codeproject.com/Tips/721384/Data-validation-in-WPF
NaibedyaKar
14-Oct-14 7:36am
View
Hi there, I think crystal report is not setup properly at your server. We need to add some references, create virtual directory and all. If you have installed the crystal report then things must have been setup properly. Can you please confirm.
NaibedyaKar
14-Oct-14 4:35am
View
Can you check if there is any virtual directory present for the website.
NaibedyaKar
14-Oct-14 3:24am
View
Are you doing any DB operations. Can you share the code which is creating the timeout.
NaibedyaKar
13-Oct-14 7:03am
View
I think it is always better to setup the scheduler on your server/machine where the scheduler will run. If you want to do it from your code then you would like to check the below blog.
http://bartdesmet.net/blogs/bart/archive/2008/02/23/calling-the-task-scheduler-in-windows-vista-and-windows-server-2008-from-managed-code.aspx
Show More