15,742,709 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 Javascript questions
View C++ questions
View Python questions
View Java 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 Al-Farooque Shubho (Top 65 by date)
Al-Farooque Shubho
16-Mar-11 3:04am
View
http://www.codeproject.com/KB/aspnet/WebSocketWhiteBoard.aspx :)
Al-Farooque Shubho
24-Jan-11 0:26am
View
You may need to use a later version of JQuery script (I tested with JQuery version 1.4.1), and, you need to make sure that the target control has "id" property. Moreover, I tested this with Textbox and DropDownList, found it working. However, for RadioButton, it wasn't working.
Al-Farooque Shubho
21-Jan-11 2:18am
View
Yes, got it. See the modified code.
Al-Farooque Shubho
21-Jan-11 1:46am
View
No, I didn't miss it. You CAN access client pc's file system using ActiveX components or Java applet/Flash/Silverlight. And yes, Server side programming won't help here, but, as a developer you will need to develop those things and deploy on server so that, these can run on client machines.
Al-Farooque Shubho
21-Jan-11 0:18am
View
Hi, sorry, it appears that I misunderstood the question and my suggested way it not correct. Thanks for your feedback.
Al-Farooque Shubho
13-Jan-11 1:22am
View
Thanks mate.
Al-Farooque Shubho
28-Dec-10 22:14pm
View
Well, if ((DataRowView)DtposMenuBS.Current)["FoodName"] is null, then the "Object reference not set to an instance of an object" error will occur.
I would suggest you to execute the SQL command on the database to see what result set appears and also to see whether any row of the result set does NOT have the "FoodName" value. Most likely one or more row does not have the "FoodName" value and that's why such error is occurring.
Al-Farooque Shubho
28-Dec-10 21:09pm
View
Exactly what error message it is showing?
Al-Farooque Shubho
28-Dec-10 6:22am
View
One thing you can do is to use a QueryString parameter to the Url to check whether the same page was requested previously.
That is, the logic could be like below:
If(currentPageUrl does not contain Request Parameter "Requested")
{
currentPageUrl = currentPageUrl + "&Requested=1";
requestHTML = myClient.DownloadData(currentPageUrl);
}
Al-Farooque Shubho
28-Dec-10 6:08am
View
Step1. The Request.Url returns the current page URL
Step2. The WebRequest myRequest = WebRequest.Create(currentPageUrl); myRequest.GetResponse(); hits a web request to the current page
Step3. Step 1 is executed again
Not sure how this is working locally, but from the given information it seems it is a recursive situation.
Al-Farooque Shubho
28-Dec-10 3:16am
View
What is the exact Exception message you are getting?
Al-Farooque Shubho
23-Dec-10 9:00am
View
Yes, answer corrected. Thanks for the feedback.
Al-Farooque Shubho
23-Dec-10 8:08am
View
Definitely WCF. (Full stop) WCF offers...(New sentence)
Al-Farooque Shubho
23-Dec-10 5:47am
View
Sorry dude, not possible. Browser simply doesn't send any necessary information (Regarding the selected text) with the Http Request. You need to get that using JavaScript only.
Al-Farooque Shubho
23-Dec-10 5:45am
View
Oh..yes. Didn't notice that :) Thanks
Al-Farooque Shubho
22-Dec-10 6:13am
View
You need not to build and send an XML document from the Asp.net web service. You just send the object you have.
However, if you really need to send an XML document from within the Asp.net web service, you send it from the web service and receive the XML document at JSP application. There shouldn't be any problem.
Al-Farooque Shubho
20-Dec-10 6:21am
View
I understood that my reply was a little bit confusing. I've modified the reply a bit so that, it is more clear.
Al-Farooque Shubho
20-Dec-10 1:19am
View
Yeah, thanks
Al-Farooque Shubho
15-Dec-10 4:03am
View
Thanks, Dave
Al-Farooque Shubho
28-Oct-10 4:05am
View
Right ;)
Al-Farooque Shubho
12-Oct-10 22:40pm
View
If a class is "internal", this class will be visible only within the assembly and no external assembly will not be able to access the class. Now, if you write any class within the "App_Code" folder, a separate assembly is created and compiled automatically. So, in this case, the class wasn't visible from the codebehind class.
In your desktop application, I guess the class was within a single assembly (Not written within a separate class library) and hence you were able to access it.
Cheers.
Al-Farooque Shubho
5-Oct-10 5:20am
View
Yes, it may be a connectivity issue from within the platform you are executing the code. Try to see the exception detail message to understand the actual problem.
Al-Farooque Shubho
28-Sep-10 1:38am
View
Wouldn't it be nice to mark it as answer if you think it deserves?:)
Al-Farooque Shubho
27-Sep-10 23:04pm
View
If turns out that you want the div background color and font color to be changed only if user clicks the hyperlink. In that case, you should change the hyperlink color using the css style property a:visited (You can Google how to do this), and, you should change the div background color in the CodeBehind (By setting a Div "ID" and runat="server" attribute)
Al-Farooque Shubho
27-Sep-10 6:46am
View
This is entirely handled by the browser or the internal implementation of the ActiveX control. I guess you can't change this.
Al-Farooque Shubho
27-Sep-10 6:14am
View
Thanks, bro!
Al-Farooque Shubho
17-Sep-10 6:47am
View
Doesn't matter. All you need is to add a new row in the DataTable and then save the DataSet as shown in the given link.
That is:
DataRow row = EmployeeTable.NewRow();
row["FirstName"] = txtFirstName.Text;
row["LastName"] = txtLastName.Text;
EmployeeTable.Rows.Add(row);
// Update data adapter, this will actually insert a new row in the database
adapter.Update(ds, "Employee");
I would suggest you to learn the basics of DataSet usage and also hope to see you reconsidering the vote for the answer. The following link may help you:
http://msdn.microsoft.com/en-us/library/aa984437%28v=VS.71%29.aspx
Al-Farooque Shubho
16-Sep-10 10:11am
View
Good catch Kubajzz. Yes, I actually wanted to mean "Compile" not "execute". Slip of pen :) (Updated the answer accordingly).
Al-Farooque Shubho
14-Sep-10 5:09am
View
It will surely work, if you can implement the method that queries the database to retrieve the user. See the statement in my answer:
"
So, you just need to implement the method GetUserFromDBByUserNameAndPassword(userName,password) which will query the database to retrieve the user object with the supplied userName and password."
Al-Farooque Shubho
8-Sep-10 3:34am
View
Yes, because, this time the values are not being submitted to the server. I would better suggest you to use LinkButton, instead of the Button.
See http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.edititemtemplate.aspx
Al-Farooque Shubho
6-Sep-10 2:39am
View
Oh..then you should just use the following code:
string filePath = System.IO.Path.GetFullPath(relativePath);
Al-Farooque Shubho
3-Sep-10 3:08am
View
"It does not seems possible to call the user control from within the Page_Load of the .aspx Page (articles.aspx)"
Well, not correct. Calling user control from within the Page_Load() is too common and it has been done million times.
Try debugging your codes to investigate the NullRefernceException.
Al-Farooque Shubho
2-Sep-10 10:43am
View
Thanks, mate.
Al-Farooque Shubho
1-Sep-10 5:08am
View
I guess you can't do that (Re-using a Form.cs class in another Form.cs class), though I am not a Windows Forms expert.
Al-Farooque Shubho
31-Aug-10 4:15am
View
Well, between these two, obviously the 2nd one.
Al-Farooque Shubho
31-Aug-10 4:14am
View
No, Validation control won't work for FCKEditor because, the FCKEditor actually renders an IFrame, in place of the text area.
You have to write Custom validation code for that.
Al-Farooque Shubho
30-Aug-10 14:33pm
View
The link I have provided has a "Generic stored procedure" that you can use to get paginated data for any table from SQL Server. I didn't try it but hopefully this is something you need. Best of luck.
Al-Farooque Shubho
30-Aug-10 2:37am
View
Oops! You should have mentioned that earlier :)
Al-Farooque Shubho
30-Aug-10 2:34am
View
Thanks
Al-Farooque Shubho
30-Aug-10 2:33am
View
I've modified my answer. Actually, I used a RegularExpressionValidator control to do the validation. This is easier and smarter.
Al-Farooque Shubho
30-Aug-10 1:52am
View
Deleted
Thanks for the comment. But, does it really deserve 3 only?
Al-Farooque Shubho
28-Aug-10 13:54pm
View
It should also work without the readonly="true" property.
Al-Farooque Shubho
27-Aug-10 2:51am
View
Yes. I just tried to help him with codes as his problem seems to be specific (How to add more parameters with keeping the syntax correct).
Al-Farooque Shubho
27-Aug-10 0:01am
View
It's OK if you don't agree with me.
I am not clear about your local environment. But, in real system, the Request.UrlReferrer will have value only if user clicked a HyperLink to navigate to this page. Check out this link : http://authors.aspalliance.com/aspxtreme/sys/web/httprequestclassurlreferrer.aspx
I also had an MSDN reference, need post that once I find.
Al-Farooque Shubho
26-Aug-10 8:57am
View
I would not call it "Best practice", but, some general rules. Try not to use any Global variable, put variables where the logically belong (A Person class should only contain the variables denoting person attributes, not any other class), expose only those variables via public accessors which are needed to be set by outside world, use "private" modifier to the variables which are not required by the outside world..etc.
Besides, you might also be interested to learn the Object Oriented Design principles. You might find this article interesting : http://www.codeproject.com/KB/architecture/SOLIDPrinciplesInOOD.aspx
Best of luck.
Al-Farooque Shubho
25-Aug-10 23:03pm
View
I wonder why you thanked Deeksha, while Al-Farooque Shubho gave you the answer :)
Al-Farooque Shubho
25-Aug-10 8:59am
View
A Quick search result provided me the following link : http://www.codeproject.com/KB/dotnet/AssemblyLoadFile.aspx
Al-Farooque Shubho
25-Aug-10 8:38am
View
Yes, correct. I was able to run the code and the menu appears without any problem. Don't know what is the problem in his case.
Al-Farooque Shubho
25-Aug-10 3:50am
View
Thanks mates, for your votes and comments.
Al-Farooque Shubho
24-Aug-10 8:45am
View
Oh..sorry boss. I missed the word "VB". My apology. I just wanted to help.
You wrote "Html input type text" and hence I didn't think about the server-end code (VB or C#)
Good to see you getting the answer already.
Al-Farooque Shubho
24-Aug-10 0:28am
View
Well, converting the VB codes into C# shouldn't be too hard. In fact, you can write your own codes just by seeing the VB codes.
Besides, you can see an example here :http://www.codeproject.com/KB/aspnet/googlewebclient.aspx . This uses a C# code, though, doesn't use a GridView.
The bottom line is, you have to use a Google web service in your application and invoke a web method to get the search result. Binding the search result and showing the result in a control shouldn't be a too big problem.
You can have a look at some GridView quick starts here : http://quickstarts.asp.net/QuickStartv20/aspnet/doc/ctrlref/data/gridview.aspx
Al-Farooque Shubho
23-Aug-10 13:50pm
View
Well, not true. If you are using a collection of objects, then, this approach is more appropriate. Because, a collection of objects means more data and the more you can cache it in session the better you gain performance :)
Even if you use DataTable, as HTTP is stateless, the DataTable will be lost when page execution is complete. So, you need to put the DataTable in the session, if you do not want to further hit the database on subsequent requests (As you mentioned in your original question).
Al-Farooque Shubho
23-Aug-10 12:19pm
View
As he is using a Web application, the DataTable will be simply lost when the page execution is complete, and at each request the DataTable has to be re-populated from the database. So, he needs to store the DataTable in some state, say, SessionState.
Al-Farooque Shubho
23-Aug-10 12:17pm
View
"In my web application I want to give the user the ability to drill down the information.." that's what he wrote. So, he is definitely working on a web application/site and hence the Session state is most appropriate to use here.
Al-Farooque Shubho
23-Aug-10 12:13pm
View
It seems that your web site/web project may have some other problems. If it does not let you save the changes any way (You can check if some other process or application is using the web.config), you can create a new web site/project, set version and then add contents from the existing web site/project to see whether that works.
Al-Farooque Shubho
20-Aug-10 3:15am
View
Good to know :)
Al-Farooque Shubho
20-Aug-10 3:14am
View
As I can understand, you have a class named as "cls_student"
So, to run the above code correctly, you need to bind the object list of "cls_student" to the GridView.
I bound some objects of "Person" class in my example:
IList items = new ArrayList();
items.Add(new Person(1, "Peter"));
items.Add(new Person(2, "John"));
items.Add(new Person(3, "Shubho"));
GridView1.DataSource = items;
GridView1.DataBind();
Note that, as I am binding the "Person" objects, in the RowDataBound, I am retrieving the object as a "Person" object. So, to retrieve an object as "cls_student", you need to make sure that, you are binding the list of "cls_student" objects to the GridView.
Al-Farooque Shubho
20-Aug-10 2:54am
View
OK, then, please post the codes of your web method or, the web service codes. This will be helpful to diagnose the problem.
Al-Farooque Shubho
19-Aug-10 23:24pm
View
Well, you are wrong.
Ideally, the "onkeyup" attribute should be added in CodeBehind. But, it doesn't mean that, it can't be added in the markup. You can add it and it works quite fine.
I added it in markup so that, the question author can understand it easily.
Just run the code in an aspx page in Visual Studio and see what is the output. I'd request you to consider re-vote after seeing the output.
Thanks.
Al-Farooque Shubho
19-Aug-10 12:56pm
View
Well, first of all you should use
sre.SetInputToWaveFile(TextBox1.Text.Trim());
Then, you should debug the SetInputToWaveFile() method where ever it is (May be inside a class library)
Al-Farooque Shubho
19-Aug-10 9:38am
View
If you set width and height, the aspect ratio is not honored. For that, I think you have to do image processing.
Al-Farooque Shubho
17-Aug-10 22:25pm
View
I don't think the OS and the framework should be the problem. Please send me the source code (or, upload somewhere and give link). I'll try to correct it.
Al-Farooque Shubho
17-Aug-10 11:42am
View
Well, it should work. Please do the followings:
1. Copy the MasterPage codes from http://www.codeproject.com/Answers/102443/newbie-navigation-problems.aspx#answer1 (The previous answer)
I know, you already copied. But please, copy again, because, it had a silly problem in the MasterPage code and I modified it later. You may have copied before I corrected the problem and hence you are getting the error
2. Then try the code that I have given here already
I just tested the page and the Calendar is working fine. Please let me know
Al-Farooque Shubho
16-Aug-10 22:24pm
View
I read your question, but, didn't understand correctly, as your requirement was not elaborated enough. Sorry for that.
As "Aspdotnetdev" suggested, there may be better ".net" way of implementing this requirement, you can try to explore those. Thanks.
Al-Farooque Shubho
16-Aug-10 8:32am
View
Yes of course. You need to close the connection once you are done with your database operation, always. So obvious that, didn't bother to mention. Thanks.
Show More