16,018,818 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 Visual Basic questions
View Javascript 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 Anele Ngqandu (Top 200 by date)
Anele Ngqandu
11-Nov-20 7:02am
View
That Richard was 100!!Thanks
Anele Ngqandu
11-Nov-20 6:49am
View
Hi Richard, sadly I tried them both but nothing. Is it maybe because its an oracle query?
Anele Ngqandu
3-May-19 1:13am
View
I did think about that and done some searching but nothing. I even tried httpclient and still get the same errors.
Anele Ngqandu
3-May-19 1:10am
View
Yep it is
Anele Ngqandu
2-May-19 11:18am
View
Thats RestSharp http://restsharp.org/. Am using restsharp to call the api
Anele Ngqandu
22-Apr-19 15:56pm
View
Hi Gerry, no it's not empty, the filtering works but somehow the redrawing of the div is not happening.
Anele Ngqandu
16-Nov-18 6:19am
View
Another thing I just noticed from the Headers, the Content-Type is not showing "multipart/form-data" but showing "text/plain"
Anele Ngqandu
16-Nov-18 5:28am
View
:( Only thing I get from the response is "An unhandled exception was thrown by the Web Application."
Anele Ngqandu
18-Jul-18 5:28am
View
Thank Jochen, I ended up using ng-bind-html
Anele Ngqandu
12-Jun-18 13:52pm
View
Thanks a lot Richard
Anele Ngqandu
12-Jun-18 4:42am
View
Cant seem to be hitting the backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e) not sure what am I missing
Anele Ngqandu
12-Jun-18 3:39am
View
HiMaciej, thanks for the reply. Initially i was using back ground worker. still had the same issue because the value that am looking for is inside Processdata on that foreach (var record in dataCases) so I kinda need a way to get that value to the UI side
Anele Ngqandu
12-Jun-18 1:03am
View
Hi Gerry, if I create 1 instance at the top, I get "Exception of type 'System.StackOverflowException' was thrown" Nothing in stack trace and nothing in Innerexception
Anele Ngqandu
4-Jun-18 10:12am
View
I have controls that am using, listviews that am populating in a foreach inside that functionality
Anele Ngqandu
7-Dec-17 3:13am
View
Karthik is correct, your GetRandomGaussian(double mean,double stddev) needs to return a double
Anele Ngqandu
11-May-17 13:00pm
View
hi, have a look at the accepted solution.http://stackoverflow.com/questions/13773810/system-net-mail-smtpexception-the-smtp-server-requires-a-secure-connection-or-t
also you can run the code from a console project.
Anele Ngqandu
24-Apr-17 10:15am
View
I tried this "&& cn.BirthDate.Value.Day >= day.Day
&& cn.BirthDate.Value.Month <= month.Month" then I dont get the upcoming days from other months
Anele Ngqandu
22-Jun-16 8:34am
View
Mmmh, ok ok its acceptable, thank you kindly.
Anele Ngqandu
10-Mar-16 3:28am
View
Hi, not sure if am allowed to place some code here but..
query('SELECT firstname,lastname,phone,email FROM employee');
// we create a list of Post objects from the database results
foreach($req->fetchAll() as $post) {
$EmployeesList[] = new Employee( $post['firstname'], $post['lastname'], $post['phone'],$post['email']);
return json_encode($EmployeesList);
}
}
this my php file...
$.ajax({
url: '/EmployeeService.php',
data: { getEmployees: 'getEmployees' },
type: 'post',
success: function (output) {
alert(output);
}
});
jquery file...
I get an error that my EmployeeService.php is not found, what am i missing ??
Anele Ngqandu
18-Mar-15 12:19pm
View
Restarted my pc the table is gone but still couldn't create DB from model so just decided to just drop the dam DB
Anele Ngqandu
12-Mar-15 9:26am
View
maybe try to use razor to hide and show what you want using if statements, but you will load everything on pageload...
Anele Ngqandu
17-Feb-15 6:34am
View
You the bows!
Anele Ngqandu
13-Jan-15 5:49am
View
Awesome,it works
Anele Ngqandu
13-Jan-15 3:56am
View
thanks ill have a look.
Anele Ngqandu
13-Jan-15 2:37am
View
The java.net.URL conflicts with the type defined in the same file and also the openConnection() is not defined
Anele Ngqandu
10-Nov-14 7:10am
View
"session = (Session)Helper.getSessionFactory().openSession();" The line that gives the problem.
Anele Ngqandu
24-Sep-14 4:25am
View
"the resource is not available" that am assuming its talking about the url on ajax
Anele Ngqandu
24-Sep-14 3:59am
View
after ajax post goes to the error function
Anele Ngqandu
23-Sep-14 5:17am
View
ow trust me i have been working on this and got working examples online but i dont see why is this code not working. This is my last stop.
Anele Ngqandu
14-Aug-14 10:56am
View
The project uses this control <asp:FileUpload CssClass="btn btn-warning" ID="fileuploadimages" runat="server" />
Anele Ngqandu
5-Feb-14 1:25am
View
Have a bunch of code in the event and in jquery there is a method that validates values that are used by the event. now either i call the jquery event on c# or the other way round. Is it possible?
Anele Ngqandu
29-Nov-13 3:13am
View
hehe...stress Gents stress, thanx
Anele Ngqandu
4-Nov-13 3:22am
View
3rd link worked for me, thank you
Anele Ngqandu
7-Oct-13 11:56am
View
Ok cool
Anele Ngqandu
7-Oct-13 11:42am
View
Is there anything I can use except cookies?
Anele Ngqandu
3-Oct-13 9:03am
View
s is accepting value from JavaScript, now JavaScript passed value of s=""
Anele Ngqandu
12-Sep-13 7:45am
View
correct!!!
Anele Ngqandu
12-Sep-13 7:34am
View
httpReq = XMLHttpRequest();
Anele Ngqandu
29-Aug-13 10:24am
View
my bad...
Anele Ngqandu
29-Aug-13 8:53am
View
So you mean every time you click a school you want to insert its ID to a database?
Anele Ngqandu
26-Aug-13 3:46am
View
You want to call this stored procedure from your code?
Anele Ngqandu
21-Aug-13 8:17am
View
Hi, had the same problem few days back. I sent the email to my gmail account and it was blocked by google mail for security reasons. They sent me a message asking me to confirm that I was the one trying to access my account.
So are you sending the email to yourself?
Anele Ngqandu
17-Jan-13 7:40am
View
what is the format of the value you converting in textbox3?
Anele Ngqandu
15-Jan-13 12:33pm
View
ow that was easy...thanks
Anele Ngqandu
9-Jan-13 9:09am
View
try
Data Source=|IP Address|\myDatabase.accdb;
User Id=admin;Password=****;
Anele Ngqandu
27-Dec-12 5:06am
View
what is the format of the EmployeeID?
Anele Ngqandu
14-Dec-12 1:25am
View
When I click another link e.g software...the links before software shifts in the page
Anele Ngqandu
14-Dec-12 1:23am
View
Hi Sampath...that is the only code i have for the siteMap
Anele Ngqandu
3-Dec-12 4:38am
View
lol do your homework dude...
Anele Ngqandu
3-Dec-12 4:30am
View
where is your code boss?
Anele Ngqandu
3-Dec-12 4:17am
View
Have you wrote an application before?secondly work with tools that you can use...its fine if you want to learn new things thou.Lastly you sound like you know what you want to do by that I mean the functionalities of the project. What you should do is write your project and if you have issues,copy and paste the code so people can debug it...
Anele Ngqandu
30-Nov-12 6:11am
View
Where is your code?
Anele Ngqandu
23-Nov-12 3:05am
View
I dont get what you saying, do you want to use the master page but you dont want it to refresh when you doing something to yo current page?
Anele Ngqandu
22-Nov-12 8:21am
View
Have you tried sessions?
Anele Ngqandu
22-Nov-12 8:13am
View
Yes you can...
Anele Ngqandu
22-Nov-12 8:08am
View
Rethink about it and yes use sessions or get userID every time the user leaves so that you can query his or her username
Anele Ngqandu
22-Nov-12 7:28am
View
you mean you want a sql statement?
Anele Ngqandu
20-Nov-12 1:43am
View
wher you publishing your site?
Anele Ngqandu
15-Nov-12 6:04am
View
Show us how do you connect or call your connection string from the code behind file
Anele Ngqandu
12-Nov-12 7:04am
View
int selcetedComboValue = Convert.ToInt32(comboBox1.SelectedValue.ToString());
Anele Ngqandu
12-Nov-12 3:24am
View
And what do you want us to do?
Anele Ngqandu
30-Oct-12 14:15pm
View
Please write a sudo code for what you want to do and plan your sql statements am sure ull find a way. If you can load a dropdown then already you geting somewhere.
Anele Ngqandu
23-Oct-12 8:46am
View
where is you code sir?
Anele Ngqandu
18-Oct-12 4:06am
View
What database you using?
Anele Ngqandu
17-Oct-12 7:31am
View
By "like" you mean like in facebook? because the question is not clear
Anele Ngqandu
17-Oct-12 2:18am
View
You mean you want to display the value of a selected checkbox? and do you have anycode yet?if you have it,please post it so we can debug.
Anele Ngqandu
16-Oct-12 2:26am
View
Ow my bad,wrote wrong schema name.
Anele Ngqandu
15-Oct-12 10:27am
View
I get what you saying sir and I did what you told me to but i get the same results.There is no database administrator am just playing with DB2 here. Am assuming it has to do with privileges thou.
Anele Ngqandu
15-Oct-12 9:49am
View
i am still geting the same error sir
Anele Ngqandu
15-Oct-12 9:39am
View
yes i do sir
Anele Ngqandu
27-Sep-12 5:04am
View
What errors you get and if you have any code please post it.
Anele Ngqandu
26-Sep-12 15:14pm
View
so whats stoping you from building it?whats your question anywae?
Anele Ngqandu
26-Sep-12 7:44am
View
you want to pass all values in your list view or just the selected one?
Anele Ngqandu
26-Sep-12 4:05am
View
I dont understand what you trying to say sir...
Anele Ngqandu
26-Sep-12 2:27am
View
does the management code work? because as far as i can see you have 2 sql requirements.other 1 needs a oparameter an the other 1 does not need parameter. so i dont think its posible,otherwise you will have wrong results
Anele Ngqandu
25-Sep-12 7:43am
View
What part of the code do you getthat error? Please put a break point then youl see wher things go wrng. A value is expecting to get a decimal not a string value somewher
Anele Ngqandu
25-Sep-12 5:38am
View
Yes sir but what do you use?
Anele Ngqandu
25-Sep-12 4:38am
View
Torsten am not talking about the sql-command am talking about the code that stores data from the database tables
Anele Ngqandu
24-Sep-12 14:11pm
View
the first code gets username only. how do you make it read and store username + password just like the second code stores both username + password data to a DataTable
Anele Ngqandu
22-Sep-12 15:13pm
View
ther is no code yet. But in my java Application back code, i need to refrance or import an external class library project with a class called "myclass".Now I need to call a method inside "myclass" to work in java application project. the links you supplied only use classes of the same project in my case I have 2 separate peojects.
Anele Ngqandu
22-Sep-12 14:31pm
View
usualy on c# when you try to get methods and classes from class library u refrance like this "using MyClasslibraryName;" on top. Now i tried to use "import MyclassLib" so i can get the class with the methods i want. But I cant find "MyclassLib"
Anele Ngqandu
7-Sep-12 9:10am
View
Try to rebuild your code if you have the table "Name"
Anele Ngqandu
5-Sep-12 6:09am
View
so do you want to selct the time e.g "12:39" from your control. Then if time matches your selected time the sms will be sent?
Anele Ngqandu
13-Aug-12 16:06pm
View
i c now...intresting, now y did it copy the database to the bin??because i created the database nd put it with the rest of the pages.thanx thou..
Anele Ngqandu
13-Aug-12 15:41pm
View
connection string works, points to my database, it identifies the error when i change column name. the dbtype limit is 100 for the nvarchars so i dont think it has to do with the text length limit of textboxes.also i changed the dbtype to SqlDbType.VarChar but nothing seems to work.
Anele Ngqandu
13-Aug-12 15:01pm
View
ther is no error Mika...it just dont insert in the database
Anele Ngqandu
6-Aug-12 6:38am
View
the non-permanent would be whn u refresh the page,then the rating evaporates
Anele Ngqandu
3-May-12 7:39am
View
thats true Sangramsingh
Anele Ngqandu
3-May-12 7:14am
View
I have to do the inheritance so cant do that...
Anele Ngqandu
3-May-12 7:05am
View
Well Sir I tried that but still nothing thats why am confused by this
Anele Ngqandu
3-May-12 6:16am
View
so the greater the size, the secure it is?is that what you saying?
Anele Ngqandu
5-Apr-12 3:11am
View
The clear method is not available for Rows sir
Anele Ngqandu
2-Apr-12 6:48am
View
no sir not working...printer is instaled but stil...
Anele Ngqandu
23-Mar-12 6:39am
View
By "Dynamic web site" you mean a site that interacts with the user by maybe user supply input and your website does the processing and throw output? e.g using Databasees
Anele Ngqandu
23-Mar-12 4:15am
View
True but The question says "how i can use abstract class"
Anele Ngqandu
16-Mar-12 5:02am
View
hehe...find this intresting: 50 - ASCII value of the character '2'...am playing around anyway
Anele Ngqandu
10-Mar-12 9:11am
View
Hi Sir
But now why use OnRowCommand="GridView1_RowCommand" and OnRowEditing="GridView1_RowEditing" while my code is inside grvTravelClaims_RowDataBound event?
Anele Ngqandu
22-Feb-12 7:06am
View
Onclick Event. But the button is not inside the gridview
Anele Ngqandu
10-Feb-12 4:59am
View
I have tried FireFox and its working fine on my PC,Am using Opera mini in my phone and its not doing good
Anele Ngqandu
24-Jan-12 3:56am
View
Hi Sir...I dont want to write text to a file but I want to have an image in my file.
Anele Ngqandu
23-Jan-12 7:14am
View
so any ideas on what i shud do?
Anele Ngqandu
11-Jan-12 6:06am
View
been googlin
Anele Ngqandu
21-Dec-11 17:03pm
View
Capture an image using a web cam,the image have to appear in a web page. Not sure if thats clear sir
Anele Ngqandu
20-Dec-11 16:59pm
View
Hi, Do you want to check if the dates are the same or what??I usually use the compare validator to compare passwords. If that's not what you want they you can use DateTime
Anele Ngqandu
20-Dec-11 16:23pm
View
Hi, do you like realy need to use java script??
Anele Ngqandu
7-Nov-11 9:07am
View
Why cant i find "AppendRange"?? the intellisense
Anele Ngqandu
2-Nov-11 8:40am
View
Deleted
do i need any web.config settings because i keep on having error abt failer of sending email
Anele Ngqandu
19-Oct-11 17:33pm
View
on Page_Load...my textbox should show the star next to it. Then if the textbox has a value then the star should disappear
Anele Ngqandu
16-Oct-11 10:48am
View
thank you...
Anele Ngqandu
14-Oct-11 19:21pm
View
how to use the rowItem
Anele Ngqandu
12-Oct-11 13:01pm
View
so what else would you like to see?
Anele Ngqandu
26-Sep-11 6:27am
View
what error do you get?
Anele Ngqandu
26-Sep-11 6:19am
View
you mean send email automatically after certain time?
Anele Ngqandu
25-Sep-11 3:07am
View
Microsoft sir
Anele Ngqandu
23-Sep-11 13:39pm
View
Employee.EmpName+' '+Employee.EmpSurname AS 'EmployeeName'
Ininialy I had FullName but i changed it fo EmployeeName
Anele Ngqandu
23-Sep-11 3:52am
View
Is it posible to show what you curently have now?
Anele Ngqandu
21-Sep-11 5:19am
View
What i removed the ajaxpopup in my page, then the values where passed, Now evry time i use the popup the values are not passed, how can i solve this
Anele Ngqandu
21-Sep-11 4:50am
View
also not working
Anele Ngqandu
21-Sep-11 4:00am
View
no..not working
Anele Ngqandu
21-Sep-11 3:35am
View
so should i create a RowCommand Event then put that if(e.CommandName)?
Anele Ngqandu
21-Sep-11 3:22am
View
thank you...it used to be added automaticaly now i dont know...
Anele Ngqandu
19-Sep-11 6:46am
View
Use modal popup extender...those ajaxtoolkit controls with javascript
Anele Ngqandu
17-Sep-11 9:16am
View
Ok no sorry i hav found my solution, i needed to select a date to fill thiis Session["SelectedDay"]
Anele Ngqandu
17-Sep-11 3:09am
View
Sory sir why did you accept the solution if its not working?
Anele Ngqandu
14-Sep-11 7:22am
View
If i may ask should i use all the classes because week.cs inherits from another class and this other class inherits from CalendarWeekRule class. So Shud I take all these classes for now so i can see the output of your code?
Anele Ngqandu
12-Sep-11 9:58am
View
The main problem is not an insert, its the mondays,insert values for all the mondays that are left for this year
Anele Ngqandu
12-Sep-11 9:57am
View
I have tried inserting the values and its working, the problem comes when i have to change the days, I mean for all the coming mondays of this year
Anele Ngqandu
12-Sep-11 6:13am
View
haha...ok sir
Anele Ngqandu
12-Sep-11 5:52am
View
sorry
Anele Ngqandu
9-Sep-11 7:54am
View
Greate solution sir, Now this is what i did with it
DateTime dtStart =Convert.ToDateTime( DatePicker.Text);
DateTime dtEnd = dtStart.AddDays(5);
DateTime dtLoop = dtStart;
while(dtLoop < dtEnd)
{
//Do something with dtLoop here or Print the date value
MessageBox.Show(dtLoop.ToString());
//Add one dat in the start value
dtLoop = dtLoop.AddDays(1);
}
Since the date will be changing i decided to put DatePicker.Text and now its not working. Any Ideas to solve this
Anele Ngqandu
9-Sep-11 7:40am
View
starting date=9/9/2011
output=9/10/2011
9/11/2011
9/12/2011
9/13/2011
Anele Ngqandu
9-Sep-11 7:26am
View
No sir you counting 5 days, I need the dates for the 5 days
Anele Ngqandu
9-Sep-11 3:35am
View
The thing is i need that value inside DatePicker.Text wich is lost for some reasons.
Anele Ngqandu
9-Sep-11 3:34am
View
I have also tried that but the value form the DatePicker.Text is lost
Anele Ngqandu
8-Sep-11 11:03am
View
I just saw that the DatePicker.Text is empty. and i dont know y because it appears in the screen to have the current date
Anele Ngqandu
8-Sep-11 9:54am
View
so it posible to save to a word or text document as long as i change the file extension?Because i dont want to save to excel. Owe and what if the gridview have more than 1 page?does it save all the pages or just the current page?
Anele Ngqandu
6-Sep-11 6:41am
View
do you know them sir??
Anele Ngqandu
6-Sep-11 5:15am
View
this is my reportviewer and am using 4.0 framework. Ama try to add this httpHandler now.
<rsweb:ReportViewer ID="ReportViewer1" runat="server">
Anele Ngqandu
2-Sep-11 9:52am
View
<asp:TextBox CssClass="textbox" runat="server" ID="DatePicker" AutoPostBack="true" Enabled="true" ontextchanged="DatePicker_TextChanged" />
Thats my textbox sir and still its saying the same thing
Anele Ngqandu
1-Sep-11 4:50am
View
Actualy i have 1 textbox and a button, now i need to know what to use to view the stuff from the textbox
Anele Ngqandu
1-Sep-11 4:25am
View
The problem is every time i add a new crystal report it shows me a .mht file to
download SAP and i did download the application and yet i still cant get the crystal report gallery.
Anele Ngqandu
18-Aug-11 5:03am
View
U see sir the thing is my modalpoup has to be inside a gridview, now in my code behind page the modalpopup cant be found. What should i do?
Anele Ngqandu
15-Aug-11 8:04am
View
I tried EnableviewState,ViewStateMode an not realy sure what to store in the session
Anele Ngqandu
12-Aug-11 8:50am
View
Intrestingly I stil get the same error
Anele Ngqandu
12-Aug-11 7:26am
View
Ok i get this error "The GridView 'grvViewAppointments' fired event RowCancelingEdit which wasn't handled. " and i cant see the RowCancelingEdit event in my code and markup.
Anele Ngqandu
12-Aug-11 7:19am
View
So a place where I put my code;
editButton.CommandArgument = "You Own Arguments"
I should put this code "frmFindAppointment.aspx?Fullname=" + HttpUtility.UrlEncode(Eval("Fullname").ToString())"? the code to pass values
Anele Ngqandu
10-Aug-11 5:36am
View
Where should i go to change host domain, so that my silverlight and service should host in the same domain?
Anele Ngqandu
10-Aug-11 3:12am
View
I get this "No Source Available Page" and throws the "TargetInvocationException was unhandled" so It dont show the code.
Anele Ngqandu
5-Aug-11 7:38am
View
If you could update your question by submiting the code you have I think I might be able to help you.
Anele Ngqandu
25-Jul-11 2:59am
View
Hi sory for late response..yes i did try, but i needed it to be true,but i already did found the solution,it was my stored procedure and my class
Anele Ngqandu
23-Jul-11 9:15am
View
no that dont work to,i need the postback to be true
Anele Ngqandu
23-Jul-11 8:59am
View
it is true but stil doing same thing
Anele Ngqandu
22-Jul-11 7:59am
View
There is no problem except i dont knw how to insert same values in multiple rows Sir
Anele Ngqandu
22-Jul-11 6:45am
View
not realy sure sir...but some one said to me "The Silverlight app cannot find your clientaccesspolicy.xml file. If you don't have one, create one. But even then you might run into trouble if you are using Visual Studio's built-in web server, which it appears you are. You need to make sure the service port's properties are the same as whatever the autogenerated port is" and i realy dont have a clue on how to do that
Anele Ngqandu
21-Jul-11 6:19am
View
no sir its not working
Anele Ngqandu
21-Jul-11 4:30am
View
It doesnt show anything,no error, nothing
Anele Ngqandu
15-Jul-11 7:41am
View
Or suppose to b a 1?
Anele Ngqandu
15-Jul-11 7:40am
View
Does the "i" in e.Row.Cells[i] comes from the "for loop"?
Anele Ngqandu
18-Jun-11 4:32am
View
no the "return patient whont be seen...
Anele Ngqandu
18-Jun-11 3:15am
View
patient = new ClsPatient(Convert.ToString(reader["PatName"]),
Convert.ToString(reader["PatSurname"]), Convert.ToString(reader["PatAddress"]),
Convert.ToString(reader["PatTell"]), Convert.ToString(reader["PatCell"]),
Convert.ToString(reader["PatWorkTell"]), Convert.ToString(reader["PatEmail"]),
Convert.ToString(reader["PatGender"]));
Anele Ngqandu
18-Jun-11 3:04am
View
Am not with you sir on the URL ReWrite concept part
Anele Ngqandu
18-Jun-11 3:03am
View
Yho!!that is serious stuff, i dont have a clue...am stil new on these things. thanx though
Anele Ngqandu
16-Jun-11 14:41pm
View
My Button
<asp:Button ID="btnSearchEmployees" runat="server" Text="..." Height="24px"
Width="64px" onclick="btnSearchEmployees_Click" />
My Gridview
<asp:GridView ID="grdAvailableStuff" runat="server" BackColor="White"
BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4"
EnableSortingAndPagingCallbacks="True" AllowPaging="True"
EditIndex="2" PageSize="5" SelectedIndex="3"
Width="525px" onrowdatabound="grdAvailableStuff_RowCreated"
>
<footerstyle backcolor="#FFFFCC" forecolor="#330099">
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<PagerSettings NextPageText="" PreviousPageText="" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<rowstyle backcolor="White" forecolor="#330099">
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<sortedascendingcellstyle backcolor="#FEFCEB">
<sortedascendingheaderstyle backcolor="#AF0101">
<sorteddescendingcellstyle backcolor="#F6F0C0">
<sorteddescendingheaderstyle backcolor="#7E0000">
<columns>
<asp:HyperLinkField HeaderText="Create Appointment" Text="Create Appointment"
DataNavigateUrlFormatString="FinalizeAppointment.aspx?name={0}&EmployeeID={1}" DataNavigateUrlFields="name,EmployeeID" />
below is the code to load my grid
protected void btnSearch_Click(object sender, EventArgs e)
{
populateDDLStaff();
DataTable dt = new DataTable();
systemBusinessLayer = new BusinessLayer();
dt = systemBusinessLayer.grid(DatePicker.SelectedDate.ToShortDateString());
grdAvailableStuff.DataSource = dt;
grdAvailableStuff.DataBind();
}
Below is my class
public DataTable grid(string date)
{
using (SqlConnection con = new SqlConnection(ConnString))
{
SqlCommand cmd = new SqlCommand("procAvailableStuff", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@Date", SqlDbType.NVarChar));
cmd.Parameters["@Date"].Value = date;
DataTable t = new DataTable("tt");
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(t);
return t;
}
}
Anele Ngqandu
16-Jun-11 10:59am
View
but the dropdown is loaded on postback sir
Anele Ngqandu
16-Jun-11 10:17am
View
ok this is what i tried see below:
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[3].Visible = false;
}
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[3].Visible = false;
}
Anele Ngqandu
16-Jun-11 10:13am
View
it doesnt allow me to put strings inside square bruckets
Anele Ngqandu
16-Jun-11 10:08am
View
yes sir but its only hiding the header not the whole column
Anele Ngqandu
16-Jun-11 9:51am
View
But intelisense cant event find RowDataBound
Anele Ngqandu
16-Jun-11 6:59am
View
Method to populate the dropdownlist
public void populateDDLStaff()
{
ArrayList staffList = new ArrayList();
systemBusinessLayer = new BusinessLayer();
staffList = systemBusinessLayer.ddlAvailableStaffPerDay(DatePicker.SelectedDate.ToShortDateString());
ddlStaff.DataSource = staffList;
ddlStaff.DataBind();
}
Method in mu bussiness layer to get the names from my database
public ArrayList ddlAvailableStaffPerDay(string date)
{
using (SqlConnection con = new SqlConnection(ConnString))
{
SqlCommand cmd = new SqlCommand("procGetEmployeesForSpecificDay", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@Date", SqlDbType.NVarChar));
cmd.Parameters["@Date"].Value = date;
con.Open();
SqlDataReader reader = cmd.ExecuteReader();
ArrayList myList = new ArrayList();
myList.Add("Select Employee");
while (reader.Read())
{
myList.Add(reader["FullName"].ToString());
}
reader.Close();
return myList;
}
}
Anele Ngqandu
16-Jun-11 6:55am
View
<asp:Button ID="btnAddStaff" runat="server" Text="..." Height="24px"
Width="64px" onclick="btnAddStaff_Click" />
protected void btnAddStaff_Click(object sender, EventArgs e)
{
if (ddlStaff.SelectedItem.Text == "Anele ngqandu")
{
MessageBox.Show("ys");
}
else
{
MessageBox.Show("no");
}
}
There u go Sir
Anele Ngqandu
16-Jun-11 6:51am
View
True Rakesh but also the SelectedValue and SelectedIndex is not working.This is strange guys...
Anele Ngqandu
16-Jun-11 6:49am
View
the code is ruuning at the back of my button and no binding i did its pure code
Anele Ngqandu
16-Jun-11 6:27am
View
I have tried that and still its not workn,The weird thing when i took that code and used it as a code behind a button, it works.Y is that?
Anele Ngqandu
16-Jun-11 5:26am
View
i know sir, but i have been changing the column number but still its giving same problems
Anele Ngqandu
16-Jun-11 5:22am
View
i did but its complaining that an interger is suppose to be inside here "[]" not the strings
Anele Ngqandu
16-Jun-11 5:21am
View
no data binding in the code sir
Anele Ngqandu
13-Jun-11 9:55am
View
Stunning!!!!!!!!!!
Anele Ngqandu
13-Jun-11 9:46am
View
helo Sir... Are we not suppose to use that when we using the databounds, because my values are retrieved using c# code, not the binding
Anele Ngqandu
13-Jun-11 6:57am
View
K i like the solution, my problem is am using hyperlinkField and navigationUrl="addpatient.aspx?name={0}".
Now the problem is navigationUrl passes this value "{0}", how can i pass the selected value inside a column of a gridview?
Anele Ngqandu
8-Jun-11 5:49am
View
thanx my stupidity...problem solved
Anele Ngqandu
8-Jun-11 5:45am
View
Ow ow my bad...didnt know the code below have effect
appointmentTypeList = new List<clsappointmentservices>();
systemBusinessLayer = new BusinessLayer();
appointmentTypeList = systemBusinessLayer.GetAppointmentTypes();
ddlServiceTypes.DataSource = appointmentTypeList;
ddlServiceTypes.DataTextField = "AppointmentType1";
ddlServiceTypes.DataValueField = "AppointmentType1";
ddlServiceTypes.DataBind();
Problem solved.
Anele Ngqandu
8-Jun-11 5:42am
View
Ok but intrestingly when am using ArrayList it works.
Anele Ngqandu
1-Jun-11 4:38am
View
do you knw where can i get a tutorial for that because am lost
Anele Ngqandu
30-May-11 9:26am
View
cool thanx it worx
Anele Ngqandu
30-May-11 8:05am
View
K thanks...Now my div is long and crossing the page, The problem now part of the div seems like is covered by another div from my master page. how can i put my div on top of that one from the master page?
Anele Ngqandu
16-May-11 3:19am
View
lovely!!I did the same 2...
Anele Ngqandu
16-May-11 2:45am
View
I declared it rightID, but then it did the same thing...So i decided to delete the proparty and start a new one and its working now.
Anele Ngqandu
11-Mar-11 4:31am
View
Deleted
The error is basicaly here " prodListID = productBL.update(product);"
Anele Ngqandu
10-Mar-11 8:38am
View
I did but now its not loading acording to selected
Anele Ngqandu
10-Mar-11 8:38am
View
Yes I did try that but still I just dont understand the problem. Below is the line
Products products = productBL.getSpecificProducts(Convert.ToInt32 (comboBox1.SelectedValue));
Anele Ngqandu
9-Mar-11 0:38am
View
K it works. just that i used "productID" instead of "ProductID"
Anele Ngqandu
9-Mar-11 0:37am
View
K thanx, it works
Anele Ngqandu
9-Mar-11 0:37am
View
K thanx, it works
Anele Ngqandu
9-Mar-11 0:37am
View
K thanx, it works
Anele Ngqandu
31-Jan-11 8:36am
View
Im a student so im just experimenting with these things but basicaly I want a simple windows form to run inside a web browser like a normal web page.
Anele Ngqandu
5-Jan-11 8:13am
View
yes i did use the breakpoint and the problem was in the courseNo variable, thats where it complains about the format.
Anele Ngqandu
5-Jan-11 7:52am
View
Hi, i tried to use the TryParse but it says "Cannot convert Bool to int"
Anele Ngqandu
16-Oct-10 11:33am
View
Thanks it worX
Anele Ngqandu
16-Oct-10 8:11am
View
Sorry Arry List Methos runs in my class
Anele Ngqandu
16-Oct-10 8:10am
View
Yes Sir by "name" I mean "ID"
//A method in code behind
public void populateCombo()
{
DataCls dtClass = new DataCls();
cboCourses.DataSource = dtClass.CognosComboBox();
cboCourses.DataBind();
}
// Below is My form
<asp:Content ID="Content1" ContentPlaceHolderID="sideContent" Runat="Server">
<div class="entry">
<p>Register <a href="Register.aspx">HERE</a> if you not a member.</p>
<table border="0">
<tr>
<td> Choose course:</td>
<td>
<asp:DropDownList ID="cboCourses" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<tr><td colspan="2" align="center">
<asp:Button ID="btnEnroll" runat="server"
Text="submit" onclick="btnEnroll_Click" /></td></tr>
</table>
</div>
</asp:Content>
//Below is the code in my method
public ArrayList CognosComboBox()
{
dbConnection();
string sqlCBO = "SELECT courseName FROM Courses;";
dbCmd = new OleDbCommand(sqlCBO, dbConn);
OleDbDataReader reader = dbCmd.ExecuteReader();
ArrayList myList = new ArrayList();
myList.Add("Choose course");
while (reader.Read())
{
myList.Add(reader[0].ToString());
}
reader.Close();
dbConn.Close();
return myList;
}
Show More