16,001,007 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 TheKarateKid (Top 54 by date)
TheKarateKid
3-Jun-17 12:30pm
View
have you tried using loadash.js library. It has way better handling for Array,Loops and repeats .... https://lodash.com/docs
TheKarateKid
3-Jun-17 12:28pm
View
I can see that you've set the update mode as 'Conditional', Are you calling update on UpdatePanel when SelectedIndexChanged is invoked? e.g. UpdatePanel1.Update();
TheKarateKid
4-Sep-16 10:04am
View
Looks like permission issue. Are you running the application from IIS Express or Local IIS? If IIS Express are you running Visual Studio with Administrator privileges? If using Local IIS 7 then please check the folder permissions from IIS Advanced Settings... - Thanks
TheKarateKid
28-Jun-16 9:32am
View
please check my reply on your previous question in similar context
TheKarateKid
28-Jun-16 9:28am
View
after selection if you hide the Menu panle, how do you want to unhide or make it visible again to select different menu ?
TheKarateKid
27-Jun-16 10:33am
View
did you include bootstrap.js?
TheKarateKid
27-Jun-16 10:14am
View
is there any way that you have session setting in IIS which is less than 120 ?
TheKarateKid
27-Feb-15 15:56pm
View
Question is not clear, but it appears what is mentioned on this link => http://forums.asp.net/t/1512722.aspx?+bobj+is+undefined
TheKarateKid
27-Feb-15 15:52pm
View
Can you post what you have tried so far? where are you facing the issue?
TheKarateKid
25-Feb-15 21:41pm
View
Have you checked the web.config file for the correct assembly versions? The version of the assemblies should match the version you are using and deploying as a part of BIN
TheKarateKid
25-Feb-15 21:38pm
View
Can you post the code to show what you have tried so far? thanks
TheKarateKid
25-Feb-15 21:37pm
View
Please post the code to show where you are facing the issue so to get exact solution
TheKarateKid
25-Feb-15 9:02am
View
How you are validating the Start Date and End Date, are you validating using JavaScript/CustomValidator? Where is that function written in register.aspx ?
If you are using JavaScript the you can get the id of a control by <%= datePickerSD.ClientID %> to get the Client ID
If you are using jQuery then you can use jQuery selector like $('#[id$=_datePickerSD]'); to get the control and so on
TheKarateKid
25-Feb-15 8:52am
View
Have you checks following things? What is the development environment you are using? Because following settings may not be available in other versions.
Whenever you add a service reference, click “Advanced..” button, in “Data Type” section the default selection for Collection Type is System.Array and Dictionary collection type is System.Colelctions.Generic.Dictionary, you can change either Collection Type or Dictionary collection type to match your requirement. These configured types will be used when generating the client proxy code for your solutions. If you have List<t> defined in the Service you can configure to use Generic List and so on.
These options which I am referring to are from Visual Studio 2010 Environment. Unfortunately in VS2008 you do not have that option. Also if you are trying to generate the proxy compatible to .NET 2.0 client then also you lose these options.
TheKarateKid
24-Feb-15 13:41pm
View
You can use listview/gridview combination if that's what you to use.
TheKarateKid
24-Feb-15 13:39pm
View
Are you asking how to debug the code on development machine or something else? Well, question is not very clear, please elaborate.
TheKarateKid
24-Feb-15 13:30pm
View
@Kapil Nandgave - Are you saying that generated proxy has different types than the you defined in Service? i.e Generic List in Service but in Generated Proxy with one dimensional array?
TheKarateKid
23-Feb-15 13:35pm
View
can you post the code snippet to show the way you are retrieving the data based on the logged in user?
TheKarateKid
22-Feb-15 17:20pm
View
1. You can maintain the Server Side Cache and filter based on the session of the logged in user. This is the one way to do it if the data is small. I would not recommend this if the data/no. of records are more.
2. If you are looking for only paging and that's the only issue, then you can look into server side paging, this will return the records you wish to display per page in the gridview/list view. you can have a stored procedure with page number as a parameter to retrieve the data associated with that page
If you can tell me the number of records we are talking about and also the growth of the data, scalability etc. then it would be more clear to me and I can provide more options
Thanks !
TheKarateKid
21-Feb-15 19:37pm
View
For me it is working
I have ASPX with following script:
<script type="text/javascript" language="javascript">
function CheckItem(checkBoxList) {
//code here
alert('Hi');
}
and markup
<uc1:Parent2 ID="Parent21" runat="server" />
Hierarchy is like this
ASPX
- Parent 2 (UserControl)
- Test (UserControls) with checkbox list
</script>
and
TheKarateKid
21-Feb-15 19:08pm
View
Please check my solution provided for your same question elsewhere =>
http://www.codeproject.com/Answers/878874/chkbox-GV-btnpresd-new-tbl?arn=0#answer2
TheKarateKid
21-Feb-15 18:44pm
View
Please check the solution provided below.
TheKarateKid
19-Feb-15 11:57am
View
By looking at the code, I think the problem is with CommandName value. Instead of CommandName="cmdUpdate" change it to CommandName="Update" and CommandName="cmdCancel" change it to CommandName="Cancel" and try it
TheKarateKid
19-Feb-15 11:52am
View
How do you know that in the edit mode, your screen is correctly sending the updated values?
TheKarateKid
19-Feb-15 11:49am
View
If you do not have Outlook installed, then may I ask, how are you testing the code?
TheKarateKid
19-Feb-15 11:48am
View
ReportViewer will display which reports ? Crystal Reports or SSRS?
AFAIK it's entirely based on how you design .rdl/.rdlc/.rpt files with single result/table or multiple. As long as procedure/query you are using returns the output contains multiple result sets and reports are design with multiple result sets report viewer should not have issues to display them
TheKarateKid
19-Feb-15 11:42am
View
Please check the Request and response by enabling the tracing on WCF config file and inspecting them with SvcTraceViewer.exe when you are accessing the required endpoint.
It is throwing any fault exception? if yes, you might want to enable the setting to flow the FaultException details to the client.
TheKarateKid
19-Feb-15 11:38am
View
May be you want check the Multi Layer and Multi Tier application options and choose the appropriate one for your development
TheKarateKid
19-Feb-15 11:34am
View
May I ask why you want to pass a reader all the way from data access layer to presentation layer? I mean you can convert the sqldatareader to datatable or Generic Collection etc. in Business Object Layer and use the same in presentation layer. I am not sure that you are also making use of Data Transfer Objects or Business Entities, if so you can return the List/Collection or DTO/BE from Business Object Layer and use it in Presentation Layer
TheKarateKid
19-Feb-15 11:31am
View
Implement Partial PostBack In XSLT, did you mean the Postback will cause transformation and provide dynamic response ? Check whether this might help you http://www.codeproject.com/Articles/8574/Generate-dynamic-ASP-NET-pages-by-using-XML-and-XS
TheKarateKid
19-Feb-15 11:27am
View
Can you check whether you have Crystal Reports Runtime installed on the Web Server?
TheKarateKid
19-Feb-15 11:24am
View
question is not clear please elaborate !
TheKarateKid
19-Feb-15 11:21am
View
Just a suggestion, based on how many records are visible in scroll area. i.e. if without scrolling the repeater can show 15 records, then with linq get first 15 records, then on scroll fetch the next 15 records and so on
TheKarateKid
18-Feb-15 14:19pm
View
LinkButton lblfrnd = ListView.FindControl("lblfrnd") as LinkButton; in ListView_ItemCommand
TheKarateKid
18-Feb-15 14:07pm
View
eitherway Solution 1 or Solution 2 works. Solution 1 is bubbling the event upto the gridview. Solution 2 handles the event where it occurs.
But only care you have to take is whichever first column/property you are using in DataKeyName attribute of the gridview, should not be with null value at any given point, else the code will not be able to read rest of the DataKeys.
TheKarateKid
18-Feb-15 14:00pm
View
May I suggest something?
1. You can keep your Table Structure (DataTable) in ViewState, so to retain it after postback
2. You can use ASP:Button for providing Download functionality.
3. If you are using Download Button inside the UpdatePanel then make sure you register the Download button as FullPostBackControl using ScriptManager instance.
4. Write the code in Button click to invoke the helper method or private method getdownloadelement.
HTH,
Thanks,
TheKarateKid
18-Feb-15 13:48pm
View
Deleted
On the service side :
[ServiceContract]
public interface ICrudService
{
[OperationContract]
DataTable GetEmployeeData();
[OperationContract]
bool DoWork(DataTable empData);
}
public class CrudService : ICrudService
{
public bool DoWork(DataTable empData)
{
//Perform any db activities
return true;
}
public DataTable GetEmployeeData()
{
DataTable dtEmp = new DataTable("EmpData");
dtEmp.Columns.Add("ID");
dtEmp.Columns.Add("FirstName");
dtEmp.Columns.Add("LastName");
dtEmp.Columns.Add("Salary");
for (int i = 0; i < 10; i++)
{
Random r = new Random(10);
DataRow row = dtEmp.NewRow();
row["ID"] = i + 1;
row["FirstName"] = "John " + (i + 1).ToString();
row["LastName"] = "Doe";
row["Salary"] = 10000.00 + r.Next();
dtEmp.Rows.Add(row);
}
dtEmp.AcceptChanges();
return dtEmp;
}
}
and on the ASPX Page where you want to consume the service:
private CrudServiceClient _proxy = new CrudServiceClient("BasicHttpBinding_ICrudService");
public DataTable Employees
{
get
{
if (ViewState["Emp"] != null)
return (DataTable)ViewState["Emp"];
else
return null;
}
set
{
ViewState["Emp"] = value;
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnGet_Click(object sender, EventArgs e)
{
if (_proxy != null)
{
this.Employees = _proxy.GetEmployeeData();
}
else
{
_proxy = new CrudServiceClient();
this.Employees = _proxy.GetEmployeeData();
}
if (this.Employees != null)
{
lblMsg.Text = string.Format("Total {0} Employees in the System", this.Employees.Rows.Count.ToString());
btnUpdate.Enabled = true;
}
else
{
btnUpdate.Enabled = false;
}
}
protected void btnUpdate_Click(object sender, EventArgs e)
{
DataTable dtEmp = this.Employees.Clone();
if (this.Employees != null)
{
DataRow newEmp = dtEmp.NewRow();
newEmp["ID"] = 11;
newEmp["FirstName"] = "Jonny";
newEmp["LastName"] = "Jones";
newEmp["Salary"] = 50000;
dtEmp.Rows.Add(newEmp);
}
if (_proxy != null)
{
if (_proxy.DoWork(dtEmp))
{
lblMsg.Text = "Employee Updated Successfully";
}
}
else
{
_proxy = new CrudServiceClient();
if (_proxy.DoWork(dtEmp))
{
lblMsg.Text = "Employee Updated Successfully";
}
}
btnUpdate.Enabled = false;
btnGet.Enabled = true;
this.Employees = null;
}
TheKarateKid
18-Feb-15 13:07pm
View
Considering reusability and distribution, you can create textbox extender using AJAX Toolkit. Here is the link which might help you ... http://www.ajaxcontroltoolkit.com/Walkthrough/CreatingNewExtender.aspx
TheKarateKid
18-Feb-15 13:01pm
View
When one needs to maintain the object in viewstate, it has to be serializable, because it by default gets serialized to encrypted Base64 string. Please check the class which you are instantiating is a serializable class. Here is something to give you an idea
[Serializable]
public class Apple
{
public string Color { get;set;}
public decimal Weight { get;set;}
}
public Apple MyApple
{
get
{
if(ViewState["AppleColor"] !=null)
return (Apple)ViewState["AppleColor"];
else
return null;
}
set
{
ViewState["AppleColor"] = value;
}
}
Apple apple = new Apple();
apple.Color = "Red";
apple.Weight = 0.5m;
//set the property in viewstate
MyApple = apple;
Apple newApple = MyApple;
TheKarateKid
18-Feb-15 12:51pm
View
The XML string you are trying to pass is a XML Fragment or XML Document?
you can have WebMethod/OperationContract with DataSet or DataTable as a method parameter. pass the DataSet or DataTable directly to WebMethod while invoking it from proxy
TheKarateKid
2-Feb-15 17:05pm
View
Have you tried using this code in unobtrusive js file and add link of that file in master page? Also, you might want to add logic to handle null references of Sys and prm the reason is that, you may not have 'scrollDiv' always available in the DOM
TheKarateKid
2-Feb-15 16:58pm
View
Looks like on your page,if you perform any other operation (ASYNC), file download won't work. By looking at the code, I'm assuming that it's inside one of the eventhandle of the grid. What are the scenarios in which your are binding the grid? You need to make sure that Post Back registration is not lost on any other operations
TheKarateKid
2-Feb-15 16:51pm
View
did you check whether your are able to select the 'txtSearch' control by jquery? you can try $('[id$=_txtSearch]') or $('#[id$=_txtSearch]') instead of $('#<%=txtSearch.ClientID%>')
TheKarateKid
2-Feb-15 16:44pm
View
As RyanDev suggested we do it on SQL server side in Stored Procedures, if there are tens of thousands of records. But I might do it DTOs or Entities by adding calculated readonly properties or GridView's RowDataBound. For example if you I want to display running total in the footer of each gridview page.
TheKarateKid
22-May-13 9:56am
View
Question is not clear, are you looking for not to auto-refresh the page on TextChange event?
TheKarateKid
22-May-13 9:30am
View
Hello,
Did you try using TextWriterTraceListener? You will have to configure the application config file to not to display trace on the page but write to log file.
TheKarateKid
22-May-13 9:19am
View
I assume that you have verb and path attribute values correct. Please check type attribute. Because thats where most of the time typo occurs. Make sure you have it correct as in this format "Namespace.typename, assembly.dll", I made similar errors many times :)
TheKarateKid
22-May-13 9:09am
View
I am not sure, but I think you are looking for, how browser requests and receives the response back from the server in HTTP Pipeline.. You may want to check this link
http://mycodelines.wordpress.com/2009/02/04/aspnet-web-page-processing/
TheKarateKid
21-May-13 16:25pm
View
Since you did not provide much detail, I would assume you are trying to filter the data based on the tree and year selection and find out what would be the tree count for the selected tree and year combination. To do so you need to maintain the x-ref between tree and year for counts. Once you do that, you can query the data once selection is being made. You can either store the values in DataTables in DataSet so that you can query them easyly and in-memory.
TheKarateKid
21-May-13 16:12pm
View
simple option would be, on TextChanged event you can perform the calculations.
But you would need three textboxes per mathematical operation. You would need to kind of hard-code the operation type.
i.e
Number1 + Number2 = Answer3
Number4 - Number5 = Answer6
Number7 * Number8 = Answer9 and so on..
TheKarateKid
21-May-13 16:01pm
View
Please check the section under which you are adding this tag. There are two places where you can add them, one to register handlers with application and the other to register with IIS/Application Server. Both Tag names are different. HttpHandlers - available under System.web i.e system.web -- httphandlers
and second, with web server i.e
system.webserver--handlers
TheKarateKid
21-May-13 15:55pm
View
If I am not wrong, I think you want to transfer the data (select row' column values) from first GridView to the second GridView. If this is true, then first you would need to access the selected values (By making use of RowIndex and DataKeys combination. then adding these selected values to second GridView' data source and rebinding it.
TheKarateKid
21-May-13 15:50pm
View
May I know how you would want to select a particular math operation? Are you going to have different buttons/links or dropdown etc. to pick the mathematical from?
TheKarateKid
14-May-13 17:47pm
View
Deleted
I'll take care of it. Thank you
Show More