15,911,360 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 P.C Shabangu (Top 35 by date)
P.C Shabangu
16-Jul-15 3:24am
View
I am a bit unsure about it because I have my API url on the html page. Is that a problem at all?
P.C Shabangu
16-Jul-15 3:23am
View
Hi All, I had a look at another example and based on it I can send the file to the to the api without having the javascript code. here is the link:
http://www.c-sharpcorner.com/UploadFile/2b481f/uploading-a-file-in-Asp-Net-web-api/
P.C Shabangu
15-Jul-15 10:09am
View
@Sreekanth Mothukuru Ok I will try it out and see.
P.C Shabangu
11-Feb-15 8:43am
View
Any help on this one my fellow developers?
P.C Shabangu
9-Feb-15 7:01am
View
I checked the code and from what I saw the values are greater than zero
P.C Shabangu
9-Feb-15 5:26am
View
Peter Leow you meant doing it like this context.rect(startX, startY, mouseX - startX < 0 , mouseY - startY < 0); ?
I did this way but nothing happened.
P.C Shabangu
28-Jan-15 7:08am
View
Thanks fellow developers. We tried all these and they worked the way we wanted them to. Thnk u.
P.C Shabangu
12-Mar-14 6:33am
View
I was assigning a value that I got from a querystring to a devxpress 2012 datetime picker on form load. did I answer your question correctly?
P.C Shabangu
12-Mar-14 5:18am
View
I tried it and it worked like a bomb. I thought it had something to do with the publish but it turns out it was my code.
Thanks Manikandan!
P.C Shabangu
12-Mar-14 3:26am
View
Hi Manikandan
I am not sure if I understand?
P.C Shabangu
12-Mar-14 2:04am
View
Any help/sugestions please?
P.C Shabangu
6-Sep-13 2:46am
View
thanx Jameel this does work, but what if I want to display the same information on a different View which is called by a different Controller?
P.C Shabangu
1-Jul-13 7:51am
View
Ok I understand. In my case the pdf document that I want to download is in a folder in my solution explorer. Will it work if I take the name of the document from the folder?
P.C Shabangu
1-Jul-13 6:08am
View
Hi Pheonyx, I changed my code a bit on the virtual path section. I ammended the VirtualPath with the name of the project as the file that I am downloading is on a folder in my solution explorer:
public ActionResult Download(string name)
{
return new DownloadResult { VirtualPath = "~/Velociti.ScriptEngine/files/" + name, FileDownloadName = name };
}
When I click on the link to try and download the file I get an error on this line of code below:
string filePath = context.HttpContext.Server.MapPath(this.VirtualPath);
context.HttpContext.Response.TransmitFile(Path.Combine(filePath, FileDownloadName));
The error says:
"Value cannot be null.
Parameter name: path2"
I think it is the FileDownloadName as when I step through my code it is NULL.
P.C Shabangu
1-Jul-13 2:13am
View
Hi, when i changed the code I got an error that says "The name 'Path' does not exist in the current context"
P.C Shabangu
16-May-13 4:16am
View
Hi all
Below is the code that I researched and it is working fine. But when I went through it, when you are uploading an excel file the code restricts the sheet name to be "Sheet1" on this line "string query = string.Format("select * from [{0}$]", "Sheet1");". How can I tweek the application to actually accept any sheetname and display. Code is below:
private void btnbrowse_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
DialogResult dlgresult = dlg.ShowDialog();
if (dlgresult == DialogResult.OK)
{
txtpath.Text = dlg.FileName;
}
}
private void btnload_Click(object sender, EventArgs e)
{
if (System.IO.File.Exists(txtpath.Text))
{
try
{
string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties=""Excel 8.0;HDR=YES;IMEX=1;""", txtpath.Text);
string query = string.Format("select * from [{0}$]", "Sheet1");
OleDbDataAdapter dataAdapter = new OleDbDataAdapter(query, connectionString);
DataSet dataset = new DataSet();
dataAdapter.Fill(dataset);
dgrvInfo.DataSource = dataset.Tables[0];
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Fail", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
else
{
MessageBox.Show("Please select a file!", "Fail", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
P.C Shabangu
15-May-13 11:03am
View
I am extremely sorry about that richb.
P.C Shabangu
9-Apr-13 8:43am
View
Hi naz I have managed to solve this query. Thanks for some of the hints you gave to me.
P.C Shabangu
9-Apr-13 5:57am
View
or can I first diplay them and then take them from the datagrid?
P.C Shabangu
9-Apr-13 5:50am
View
Would it be possible if can assign the values that I get from the datatable to the variables I declared:
for (int i = 0; i < GridRowCounnt; i++)
{
StoreId = Convert.ToInt32(dgrgPnPStores.Rows[i].Cells[0].Value.ToString());
address = dgrgPnPStores.Rows[i].Cells[5].Value.ToString();
_PnPStoresListDataTable = _AddressServiceData.GetGoogleSearch("", address + " South Africa", "", "");
NewLongitude =
NewLatitude =
_PnPStoresListTableAdapter.UpdateLatitude_Longitude(StoreId, NewLongitude, NewLatitude);
}
P.C Shabangu
9-Apr-13 4:14am
View
This is where I am stuck here for the longitude nad latitude:
_PnPStoresListTableAdapter.UpdateLatitude_Longitude( Int32 StoreId,
P.C Shabangu
9-Apr-13 3:42am
View
I am not sure if I follow. I am using the store id for updating the newlongitude and newlatitude which I get from the GetGoogleSearch method and save it in the respective columns in the database.
P.C Shabangu
9-Apr-13 2:51am
View
Hi this is the code I have now. I want to update using the store id from the database but update the New longitude and New latitude which I get from the internet using GetGoogleSearch method. Please advise on how to pass the values as I want to update the database.
Code below:
private void btnMapStoreAddresses_Click(object sender, EventArgs e)
{
AddressServiceData _AddressServiceData = new AddressServiceData();
DataTable _PnPStoresListDataTable = new DataTable();
int GridRowCounnt = 0;
PnPStoresListTableAdapter _PnPStoresListTableAdapter = new PnPStoresListTableAdapter();
string address = string.Empty;
int StoreId = 0;
string NewLongitude = string.Empty;
string NewLatitude = string.Empty;
try
{
GridRowCounnt = dgrgPnPStores.RowCount;
for (int i = 0; i < GridRowCounnt; i++)
{
address = dgrgPnPStores.Rows[i].Cells[5].Value.ToString();
_PnPStoresListDataTable = _AddressServiceData.GetGoogleSearch("", address + " South Africa", "", "");
_PnPStoresListTableAdapter.UpdateLatitude_Longitude( Int32 StoreId,
}
}
P.C Shabangu
8-Apr-13 8:55am
View
I have actually created a stored procedure and tried calling it in my code but it does not run at all. I get errors.
P.C Shabangu
8-Apr-13 6:59am
View
This is the stored procedure that I have:
create proc UpdateLatitude_Longitude
(
@address varchar (max),
@NewLongitude nvarchar(50),
@NewLatitude nvarchar(50)
)
as
Update PnPStoresList
Set NewLongitude = @NewLongitude , NewLatitude = @NewLatitude
P.C Shabangu
8-Apr-13 6:50am
View
I am not sure if I follow you. Please can you clarify it for me in code. I am confused.
P.C Shabangu
12-Oct-11 12:09pm
View
but is there code that I have to write for this kind of validation because it looks as if there is alot of code that has to be written?
P.C Shabangu
4-Oct-11 22:48pm
View
ok.thank you.
P.C Shabangu
4-Oct-11 20:29pm
View
ok I understand.but will it be also a big problem if I use javascript code to display my message box?
P.C Shabangu
13-Sep-11 4:26am
View
I dont understand. It is not working because I tried it many times and it is not working.
P.C Shabangu
2-Sep-11 8:03am
View
The problem is that I know how to retrieve the images using the sql datasource but now I want to return the images using the business logic layer using the object datasource
P.C Shabangu
29-Aug-11 11:32am
View
Thank you it worked very nicely.Thank you
P.C Shabangu
29-Aug-11 11:31am
View
Thank you.It worked nicely.
P.C Shabangu
14-Jul-11 12:18pm
View
yes it is copied directly from my program.
P.C Shabangu
14-Jul-11 5:47am
View
I dont quite frankly understand.
Show More