15,890,123 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 njammy (Top 200 by date)
njammy
22-Mar-22 18:33pm
View
Please share details of what you "tried to do with your tables" but without success and I'll try and help
njammy
17-May-17 14:23pm
View
Do you mean you are receiving an exception about zero index array out of bounds or similar?
Please clarify using the Improve Question link button on this page and update your question with the exact problem you are having.
njammy
12-May-17 16:47pm
View
Do you want to insert the image binary raw data? or the file path of the image file?
njammy
17-Feb-17 14:20pm
View
Have you tried setting attribute on your controller action to receive the ajaxBegin request as HttpPost?
njammy
16-Feb-17 4:58am
View
Please kindly post the xml content being loaded.
njammy
14-Feb-17 5:05am
View
Please explain in more detail what Ageing column is for?
njammy
13-Feb-17 11:12am
View
Can you not use a MS SQL Sequence object?
njammy
10-Feb-17 5:33am
View
Where is your menu items markup?
njammy
10-Feb-17 5:20am
View
Please can you update your question with markup for the menu items.
njammy
10-Feb-17 4:55am
View
What is the type declared of model.ISBN?
njammy
10-Feb-17 4:54am
View
Please can you update your question with markup.
njammy
9-Feb-17 9:37am
View
How?
njammy
9-Feb-17 9:33am
View
1. It could be that Gmail and yahoo have blacklisted the IP or source domain that you are using to send the emails.
2. You will not get a .net exception on failed email sending, because the Yahoo and Gmail services do not send a error response deliberately. This is so that potential spammers do not become wiser on whether the emails being spammed are valid or not.
3. The email accounts might be inactive or full, again the response will not be given due to reason 2.
4. Try using a well respected provider, if not already to send the emails from your system and see if the problem is recreated.
njammy
9-Feb-17 9:14am
View
What is your question?
Please state the exact issue you are facing with reference to your lines of code.
Please give us idea of what the controls state is and where you are facing problem.
njammy
9-Feb-17 9:12am
View
how did you deploy the app to the client?
njammy
19-Sep-16 5:40am
View
what?
njammy
16-Sep-16 2:33am
View
Then there is something wrong with the server not your code
njammy
14-Sep-16 5:24am
View
What happens when you access the url from your browser directly?
njammy
8-Sep-16 5:40am
View
Elaborate
njammy
7-Sep-16 7:46am
View
Please move this code to the question main body
njammy
7-Sep-16 7:37am
View
Deleted
Please remove this code from comments and put it in the question (click Improve question)
njammy
7-Sep-16 7:36am
View
What is the version of the dll: "CrystalDecisions.Shared.SharedUtils"? (select the reference in visual studio and hit F4 to see properties)
njammy
7-Sep-16 7:30am
View
In order to get an answer, please update your question with paragraph explaining your current problem and some sample code of what you already tried then we have more information to give an answer, thank you.
njammy
7-Sep-16 6:49am
View
Ok good. So what does the line DropDownList dropDownLst = (DropDownList)e.Row.FindControl("ddlIndustrialarea"); return? I mean what is the value of dropDownLst?
njammy
7-Sep-16 6:44am
View
What is the value of userdetailsBAL on the line:
<pre lang="c#">DataTable dt = userdetailsBAL.getindustrialarea();</pre>
njammy
6-Sep-16 12:05pm
View
Ok thanks for the tip. Happy trolling.
njammy
6-Sep-16 11:52am
View
I have many a time taken inspiration from code from years ago, that's the
beauty of the internet. And someone may use my answer in 3 years time.
Book mark this page so you can further comment after 6 years.
njammy
6-Sep-16 10:52am
View
Will only work if you know all possible unique ParentIds, or have the time to type it all out manually.
njammy
6-Sep-16 8:10am
View
lol.
I meant what verbal spoken human language is it...
njammy
6-Sep-16 7:36am
View
What language is that?
Look at development for multi-regional translation using resource file.
njammy
6-Sep-16 6:19am
View
The view model and JSON can have totally different properties. Design your view model only for the data you need for that http response. and do the same for JSON objects. No need to copy and reuse view models when you don't need all fields.
njammy
6-Sep-16 5:43am
View
This code will not work. You are assigning HTML content to html input fields, which require plain text, not html. I thought from your original question you want to display html returned from a ajax call? then is totally the opposite of what you want to do.
Looking back at your code, your method GetcompanyInfo is returning JSON data not html.
you need to change the ajax call config like my updated answer, and set the field values in the udpated logic in the answer.
njammy
6-Sep-16 4:55am
View
Where are these values stored? text file? database? constants?
njammy
5-Sep-16 11:28am
View
Your code doesn't set the data source to the report viewer control. Set that and then reaload it.
njammy
5-Sep-16 10:33am
View
But you are not evaluating boolean to anything. It is better to just get rid of the if(true/false)
I'm afraid I don't have v12.0.0.683 to test if I can recreate the issue, but I used 13.0.2000.0 with VS2015 and works fine. Try that version.
njammy
5-Sep-16 10:16am
View
Why have you placed a if(false) statement?
njammy
5-Sep-16 6:36am
View
When you debug up to the line
ds.ReadXml(xmlData);
What does the DataSet look like? (how many tables, rows etc)
njammy
5-Sep-16 5:55am
View
Which line is causing the exception?
njammy
2-Sep-16 12:45pm
View
Look into using logstache which is a nosqldb technology to index the content in the files. Setup some parallel processes to use indexed datasource and process data that way.
njammy
2-Sep-16 12:42pm
View
Without knowing your tool set skills set etc I'd suggest using DTS package or SSIS package to load txt file data to a database table then query only necessary data to build the output or processing. Much more efficient and parallel mechanics.
njammy
2-Sep-16 11:50am
View
Are the files in any particular format?
njammy
2-Sep-16 11:35am
View
Deleted
Check that your Authentication section looks similar to this
<authentication mode="Forms">
<forms loginUrl="~/Login.aspx"
timeout="2880"
cookieless="UseCookies" />
njammy
2-Sep-16 11:29am
View
Remove the customSessionProvider and use default see if it helps.
Check that your Web.config Authentication section looks similar:
<authentication mode="Forms">
<forms loginUrl="~/Login.aspx"
timeout="2880"
cookieless="UseCookies" />
</authentication>
njammy
2-Sep-16 11:05am
View
Just a sanity check, create a brand new blank solution and one page which sets and gets a session var. Reply here with the results.
njammy
2-Sep-16 11:00am
View
Code looks fine, what is the value of Session["EmployeeName"] when the debugger hits the "else"?
njammy
2-Sep-16 10:58am
View
Where is the date format conversion code...
njammy
25-Aug-16 7:22am
View
Are you sure there is no page validation at master page level that is being triggered when you click link button? Look again.
njammy
25-Aug-16 6:34am
View
Ok and so what is the error you are seeing when master page is used?
njammy
25-Aug-16 6:13am
View
No there is not, I mean the <%@ Page declaration with masterpage attribute.
Also, what is the exact error you are seeing?
njammy
25-Aug-16 5:43am
View
...It will be good for you to also include your Masterpage declaration in your question too.
njammy
25-Aug-16 5:15am
View
Debug13, Please click "Improve Question" and include your markup and code behind in your question.
njammy
24-Aug-16 5:03am
View
No You can do a single query for the child data on page load or other load point, and then on row data bound for child gridview lookup the data from that child data.
If you do any query inside RowDataBound, you will be calling the database multiple times, which can hurt performance.
njammy
23-Aug-16 12:13pm
View
You're welcome happy coding.
njammy
23-Aug-16 7:57am
View
I mean in the main solution answer text above.
njammy
23-Aug-16 7:48am
View
Ok I understand what's gone wrong. Please check my updated solution. The placeholder visibility overrides all inner controls.
njammy
23-Aug-16 7:33am
View
Ok please pinpoint the actual issue you are facing and explain the behaviour you are getting from this code now?
By the way, your markup for placeholder in this code does not have visible="false" attrivbute.
njammy
23-Aug-16 7:19am
View
Please update your question and post the complete page markup and complete code behind.
njammy
23-Aug-16 6:54am
View
I assure you it works.
Try it on a new page and then fix your own original page step by step.
njammy
23-Aug-16 6:11am
View
schedule_Departure_Date
What is this value type being bound? String? DateTime? what?
njammy
23-Aug-16 3:34am
View
You need display:none
njammy
22-Aug-16 7:27am
View
brockeu, ppolymorphe has a good point, think about partial loading of file or content for better performance with suitable choice of controls.
njammy
22-Aug-16 7:09am
View
brockeu wants to know an alternative text / drawing layout rendering controls to basic text box.
njammy
22-Aug-16 7:05am
View
In MVC default project there is a web.config file inside Views folder.
You can also add this setting: "<add namespace="CrudeOperations.Models">"
<system.web.webpages.razor>
<host factorytype="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"></host>
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc"></add>
<add namespace="System.Web.Mvc.Ajax"></add>
<add namespace="System.Web.Mvc.Html"></add>
<add namespace="System.Web.Routing"></add>
<add namespace="CrudeOperations.Models"></add>
</namespaces>
</pages>
</system.web.webpages.razor>
This then allows you to simplify the reference in cshtml (if it inherits that web.config) as
@model City
Hope this helps.
njammy
22-Aug-16 6:59am
View
Project name is just visual studios way to include code files in one project.
Project name can be different to assembly name and namespace. Each project can have only one assembly name, but it may contain many namespaces.
If you right-click on project name and properties, you will see under "Application" page, "Assembly Name" and "Default Namespace".
Assembly Name: what the dll will be named when built.
Default Namespace: when adding a new class, Visual Studio will auto name the class inside default Namespace. Change it if you prefer to separate your code into domains or groups.
see https://msdn.microsoft.com/en-us/library/ad7d6w76.aspx
njammy
22-Aug-16 6:56am
View
That's correct, each cshtml file must include a reference to the model class (if any is used or required).
Consider a normal C# class, it would look like :
"using CrudeOperations.Models; // namespace /assembly reference for when the class you are writing is in another namespace.
namespace WebApp1
{
public class TestClass1()
{
public City MyCity {get;set;}
public TestClass1()
{
MyCity = new City
{
StateName = "Florida"
};
}
}
}"
njammy
22-Aug-16 6:25am
View
No that is not how it is.
Let me break it down like this:
CrudeOperationsDemo.Models.City
"CrudeOperations" <-- This is the assembly name and reference.
"Models" <-- This is the namespace "Models" i.e. many classes can have same namespace.
"City" <-- This is the class name. So "model => model.StateName" is referencing the City class instance.
"model => model.StateName"
"model" <-- MVC internally creates an instance of City class object and this is the same as doing:
City model = new City();
Hope this helps.
njammy
22-Aug-16 5:53am
View
Is the control on the main page markup?
Where in the control hierarchy does it sit?
njammy
19-Aug-16 5:16am
View
If you fixed it please upload your fixed code.
njammy
18-Aug-16 6:02am
View
What do you mean DataTable in MVC format, please give more explanation instead of going around in circles.
njammy
18-Aug-16 4:17am
View
I gave you an answer according to the question not this last comment.
What do you mean DataTable in MVC format?
njammy
18-Aug-16 4:15am
View
That does not make sense sorry, the example I tried works. Check your SQL.
njammy
17-Aug-16 6:13am
View
Why not just do
var statusCode = response.StatusCode;
and then handle it in a generic handler to build the appropriate response back to the client.
njammy
17-Aug-16 6:00am
View
You're welcome, happy coding.
njammy
17-Aug-16 5:36am
View
Hi Subhash PM
Please click Improve Question and post some markup you already have.
My initial thoughts are that your ASPX page inside the iFrame is not registering the bootstrap scripts or your main web application's bundles (css, scripts etc).
In developer tools in browser (F12 key) check the iframe page sources and check they're loaded.
njammy
17-Aug-16 5:16am
View
Please click "Improve Question" and copy and paste the following:
- The markup for the page which contains the partial
- The control action of the container page
- The markup for the Partial View
njammy
17-Aug-16 4:56am
View
Deleted
Are you getting an error of some sort? Please share.
njammy
16-Aug-16 10:33am
View
All the best.
njammy
16-Aug-16 10:16am
View
In my opinion asking a user to open and e-mail, click a link, then copy and paste the password from the (same? email?) is too many steps. What I would do is send the user an e-mail with a link with some kind of "access code" embedded e.g.
http://www.web.site/upload?key=SDFSASDNU23HD783.
So the idea is this part of the url "?key=SDFSASDNU23HD783". Let's suppose this is scrambled text from original string: "id:1,key:12345", where "id" is your users id and "key" is your uniquely generated access code. Let's suppose we convert the string id:1,key:12345 to base64 and get "SDFSASDNU23HD783" (not realistic but you get the idea). This may not be secure enough but that depends on how secure you want it to be, so it may actually be better to make the user copy and paste the code.
Now you can store this in a new database table along with your users id, and a column called "Expiry" (DateTime). When you generate a code, set the expiry.
In my example url, when the upload page receives the request, first query the DB to see if the access code part of the query string is expired or not. if not, authenticate the user, if user is not correct, send them away and update the access code database table value as VOID, because someone tried to attempt to access with wrong code/username combo.
Make sense?
njammy
16-Aug-16 10:03am
View
Ok, hope this helps. Reply anytime once you start your development and need any technical development help.
njammy
16-Aug-16 8:53am
View
Okay......so I ask again...what is the error
njammy
16-Aug-16 8:44am
View
I can't see any other solution other than the stack overflow one. Sorry.
njammy
16-Aug-16 8:17am
View
Please can you post text of the error you are getting. Or take a screenshot and upload to imgur share link.
njammy
16-Aug-16 8:10am
View
Check link in ans.
njammy
16-Aug-16 7:29am
View
This is the only piece of data you have in string format or DateTime?
njammy
16-Aug-16 7:22am
View
Are you able to use jQuery for this or not? it may help make it easier.
njammy
16-Aug-16 5:52am
View
Are you using async task or similar threaded logic to detect when a command is complete? Sometimes the commands don't get acknowledged until a previous one returns a completed signal.
njammy
15-Aug-16 6:45am
View
Post some code.
njammy
15-Aug-16 6:43am
View
What is the "name" attribute of your connection string set to?
njammy
15-Aug-16 6:41am
View
Eh?
njammy
15-Aug-16 6:20am
View
I think everyone will agree that you should have mentioned your custom database in the first line of your question as it's pretty important.
njammy
11-Aug-16 5:00am
View
What do you want to "set" the combobox to?
Also, this line gridControl.AllowAddNew = false; is not winForms standard. Please can you be very detailed in the techonology and controls/plugins you are developing with?
njammy
11-Aug-16 4:23am
View
Please clarify your question referring to your code and where it is not working as you expect. Click on Improve question to update it.
njammy
11-Aug-16 4:09am
View
Please show us the <entityframework></entityframework> section in your app.config/web.config.
njammy
11-Aug-16 4:08am
View
Hi Pinky,
please clarify something, your question is about how to retrieve a control from a grid control but your code sample is showing us how to add a control. This is confusing.
Can you please explain the technology you are using as well, 'web forms', 'win forms' etc.
njammy
11-Aug-16 4:03am
View
You're welcome. Please post your final solution sample when you get it for helping others in future.
njammy
10-Aug-16 4:52am
View
This part of you code doesn't seem to make any sense, can you please explain the code:
var lable = document.getElementById("<%=title1.ClientID %>");
var titl = $("[id*=title1]");
You seem to be trying to access the same element using two different approaches.
Try replacing 'titl' var with 'lable'
njammy
9-Aug-16 16:29pm
View
Consider distributed processing via multiple services/transactions and keep track using a more efficient model.
njammy
9-Aug-16 11:44am
View
It absolutely works with many items.
By the way this will work async as well if you replace my code "beginForm" with Ajax form.
njammy
9-Aug-16 8:58am
View
ok...please mark as answer if this helped. And if possible put some example of your solution for helping others.
njammy
9-Aug-16 7:19am
View
Have you checked if the cookie is expired or somehow invalid and causing the page to logout due to this?
njammy
9-Aug-16 5:56am
View
Which line of code is not working as you would expect?
njammy
9-Aug-16 5:55am
View
Is this in ASP.NET?
njammy
9-Aug-16 5:21am
View
What are the requirements for this? i.e. How will this position be used.
njammy
9-Aug-16 5:13am
View
Please can you post your JavaScript code as well.
By the way, is your issue that the click event you declared is not firing?
Or that the controller action is not being called on click?
njammy
9-Aug-16 5:05am
View
Please update your answer with the code it created and I will have more detail in order to answer.
njammy
9-Aug-16 4:58am
View
I agree well done for a solution none-the less, one day someone may come here and choose to adopt the Linq solution if in fact they are able to utilise it in their solution.
njammy
9-Aug-16 4:57am
View
That's how we all learn anything.
njammy
8-Aug-16 10:25am
View
Are you able to use Linq in your solution? let me know. otherwise I will give an alternative.
njammy
8-Aug-16 7:23am
View
You're welcome, if you get a chance please rate my answer too using the stars to help others find the solution more efficiently.
njammy
8-Aug-16 7:13am
View
Deleted
You're welcome, if you get a chance please rate my answer too using the stars to help others find the solution more efficiently.
njammy
8-Aug-16 7:11am
View
What framework are you developing a form for? Web forms? MVC? WinForms? Please update your question with more detail.
Please also post some code you used so far.
njammy
8-Aug-16 7:08am
View
Thank you all the best
njammy
8-Aug-16 5:39am
View
Please update your question with HTML markup, button events and code behind you have already got and I will help with this further detail.
njammy
8-Aug-16 5:25am
View
While I am happy to see you have solved it, it's not cool to accept an answer, then undo the accept, only to add your own answer. If my answer helped then please mark as accepted for other developers facing this issue in the future, for their benefit.
njammy
5-Aug-16 10:41am
View
What level of developer are you? are you professionally employed or do you want to develop something in your spare time?
njammy
5-Aug-16 10:29am
View
What is the data source? MySql, MS SQL, Oracle etc???
njammy
5-Aug-16 10:28am
View
Please update your question with more details:
Which method are you attempting to access the drop down list?
njammy
5-Aug-16 7:47am
View
Please update your question with the code for the 'Home' model class.
njammy
5-Aug-16 5:46am
View
What does your "sendToEmail" functionality/code look like? Please post it.
Also please post your email template, or how you want it to look?
I don't think you should be trying to "send" your grid view to the email.
You should be constructing a new layout specifically for email content.
The grid view's only purpose should be to manage the data records before doing something with the data. i.e. if the user deletes a record, the email is only interested in what data is left.
Ideally you should be updating a data source data table in memory and using the GridView to update it.
When you want to send the email, retrieve the memory data table and it will be the source data for your email template. If I have understood anything wrong, please explain.
njammy
5-Aug-16 5:37am
View
Please update your question with your code and what your mappings look like.
njammy
5-Aug-16 5:36am
View
Please update your question with any code you have written already which wants to call "RenderViewAsString" method.
njammy
5-Aug-16 5:34am
View
Please post some sample HTML/ASP.NET markup, and code (Vb.net or C# etc?)
njammy
5-Aug-16 5:31am
View
You state in your question:
"I have tried to change the table name"
This implies you want only one table with all data from Excel file worksheets in one table?
If so, then I suggest you use ODBC connection to Excel file and construct query in code to group all data from all sheets and read into a single DataTable object.
njammy
13-Oct-15 5:32am
View
Are you allowed to or able to use Javascript client side to achieve this?
njammy
13-Oct-15 5:30am
View
Are either of these two methods causing a long running process or query on the database or server-side?
LoadOutwardGrid(curPage, 10, Convert.ToInt32(Session["SELECTED_DEPT"]));
LoadInwardGrid(curPage, 10, Convert.ToInt32(Session["SELECTED_DEPT"]));
How long do they take to complete?
njammy
13-Oct-15 4:47am
View
I have tested your code using dummy data and I cannot reproduce the issue.
Please can you explain what type is returned by the statement:
frm["ApplicationValue"]?
I presume it's a string value but please confirm.
Maybe the error is elsewhere.
njammy
13-Oct-15 4:33am
View
Please post code and what you have so far so I can offer best help.
njammy
30-Jul-15 8:54am
View
Please can you use the Improve Question option to add the method / event in which the code you posted is being called from?
njammy
30-Jul-15 8:49am
View
Also please use the Improve Question option to explain the current problem you are getting; "Unable to store value" could mean lots of different possible problems, please explain.
njammy
30-Jul-15 8:44am
View
Please can you give me the value of TextBox1.Text after you click Button2_Click? Hit reply to this comment and let me know.
njammy
30-Jul-15 8:40am
View
Is there a reason you cannot use a .NET data bound control e.g. data list view or gridview or Details View to achieve this?
njammy
30-Jul-15 8:36am
View
Are you able to use JavaScript in your solution? I ask because if you can, then a new window launcher script can be bound to a control in the GridViewRow and then trigger the browser print function on the 'Invoice' page.
njammy
30-Jun-15 7:10am
View
Please can you update your question with more detail e.g. a design, what you want to achieve, and page names or examples.
thanks
njammy
30-Jun-15 6:20am
View
Why do you need to use cookies?
njammy
30-Jun-15 6:13am
View
Are all the column values non-null when it is being read by the code? That can sometimes cause the col count to be less that what is physically in the file.
njammy
30-Jun-15 6:11am
View
Are you getting some sort of error? or are you seeing unexpected grid view results as a result of the query? Please elaborate.
njammy
30-Jun-15 6:05am
View
Does it work if you try one datasource per report? It could be conflicting when trying to use the same for both.
njammy
30-Jun-15 5:53am
View
Please explain further with code sample, what you have built so far, and what data you need to search on?
njammy
10-Jun-15 20:45pm
View
Do you have access to a SQL Server instance? Ideally you should create scripts from your localdb mdf database (manually or via SSMS) and run on the live server.
Then point the app to the new db on live, using app.config connection strings.
njammy
10-Jun-15 14:15pm
View
Normally results are printed out and pinned to a wall.
njammy
10-Jun-15 14:13pm
View
Should this question read something like "Teach me MVC development?"
njammy
10-Jun-15 5:00am
View
Well it won't save the file to Client PC because the web application is running on the server and the export code is executing on that end.
You need to push the file content to the client browser using the HttpResponse object.
In the link I provided previously, have you tried the HttpResponse (add header, flush) approach? Only that needs adding to your code at the end, set the content type to pdf and see if that works.
This example is more suited to PDF file saving.
http://stackoverflow.com/questions/5586772/asp-net-sending-a-pdf-to-the-user
njammy
9-Jun-15 11:49am
View
Hopefully can help you. Can you confirm the value you are getting in the label1.Text property in line :
try
{
this.grupeTableAdapter.FillBy12(this.dbDiplomskiDataSet.grupe, label1.Text);
}
?
Also it seems from your code logic that each time you loop over the data grid view row, the table adapter you have there will overwrite any previous rows data retrieved. Technically you should only get the last selected row data.
njammy
9-Jun-15 10:56am
View
Does your GridView render on only first page load? or never? or when Button1_Click is raised?
njammy
9-Jun-15 5:16am
View
Are the headers going to be static list of items? Or may they change?
njammy
5-Jun-15 10:24am
View
Sorry this is not the direct answer to your question but one thing that stood out to me in your example code, is that your code is making a database call for EVERY data row in the gridview. This should be done as a pre-load method. Then when you generate your dynamic column, load the correct value from the pre-loaded data from other datasource.
Also, If you put the foreach() loop inside the RowDataBound event it will only set the label value to the LAST records values. You need to move this logic outside.
njammy
5-Nov-14 18:05pm
View
Please try and create a new vs2005 project and recreate a simple tree view with default image set. see if it works. If it works, copy the web.config httphandlers section and others which reference webresources, web controls and extensions to your ported project.
njammy
5-Nov-14 17:40pm
View
I would bind the initial check box changed event to an ajax call to retrieve more data.
With that data, construct more checkbox list items and render using jquery.
njammy
5-Nov-14 17:36pm
View
Does the web config correctly reference the httpHandelr section for WebResources?
njammy
5-Nov-14 17:29pm
View
What version of IIS are you using? are the .axd file mappings setup correctly on the IIS mappings served?
njammy
5-Nov-14 17:22pm
View
Please share the image properties from the browser inspect element i.e. <img src=?.../>
njammy
5-Nov-14 17:15pm
View
When you debug the front end page, please share with us the image source the browser is trying to bind to the image. (Right click image and look at source or use developer tools F12 (IE) or right click and inspect element.)
njammy
5-Nov-14 17:10pm
View
Where is the code or css/skin to assign the image to the tree control?
njammy
7-Feb-14 7:30am
View
Your welcome. If this was the answer you were looking for I might suggest you re word your question to something like 'How to populate gridview from SQL query.' to help others at your stage.
njammy
7-Feb-14 7:03am
View
What is in your SetRowData() method
njammy
7-Feb-14 6:19am
View
Please post your markup and current code behind so far.
njammy
7-Feb-14 6:08am
View
If it is an ajax call making the upload, then the textbox is client side at that point, so it should be updated via the ajax upload events.
Please post your code behind.
njammy
7-Feb-14 4:29am
View
Post the code and markup you have implemented so far please, including your use of the "non" .net framework button.
njammy
6-Feb-14 11:47am
View
Simple but, Have you tried rebuilding the solution?
njammy
6-Feb-14 11:45am
View
"...i can post my question in detail"
Yes, please do.
njammy
21-Jan-14 18:24pm
View
No problem, did my solution work for you? If so, please mark so other users can find it helpful or I will update it again for you.
njammy
21-Jan-14 11:49am
View
Please use the improve question function to add more detail to your question like what data you want to enter, how you wish to preview it, and what exactly you want to preview.
njammy
21-Jan-14 11:46am
View
Person person = AccountManagement.ApiLogin(username, password);
This line shows that AccountManagement.ApiLogin return type is Person.
What it actually does is unknown. Assuming you want to achieve the same goal of logging a user in or 'authenticate' you can create a similar method as ApiLogin and call it Login(username,password). Within that method you will verify the username exists, then verify the credentials are valid.
njammy
21-Jan-14 9:02am
View
Look at using AjaxControl tool kit, specifically the dynamic populate control.
Drop one of them on the page, link it to a div or other control.
Add javascript onclientclick event to the calling button/control. The javascript onclientclick event will construct e.g. pipe separated values e.g. user=john|maxrows=20|search=dbSearchString. Pass this parameter set into the dynamic populate controls 'populate()' method in js.
Put your Database search methods in a web method in a new web service. Set the dynamic populate control's servicePath property to this new web service name. e.g. fooBar.asmx and set the method name which will do the search.
Add a parameter to the search method / web method to accept a contexKey: your parameter set.
Split this by pipe character into key value pairs.
Use them in your DB search. once the data is back from the DB within your web method, construct html e.g. <table> and populate it with <td>'s etc for each data row returned.
Return the html markup from the web method. The dynamic populate control has a target control id, which you can assign to a div:id e.g. <div id='dbSearchResults'></div>.
The dynamic populate result will stuff the div with the markup from the web method.
there is no postback involved and you can show updates this way.
njammy
21-Jan-14 7:57am
View
What is triggering your content page dlTopProducts_ItemDataBound event?
njammy
21-Jan-14 7:54am
View
Did you rebuild your solution after adding it?
Can you access it from code behind? i.e. FileLocationsTableAdapter fTa = new FileLocations TableAdapter
njammy
21-Jan-14 5:34am
View
Reset the browser tab settings to default and report back.
njammy
21-Jan-14 5:13am
View
This can depend on the user's browser tab settings which may override your code. IE has options like 'Open pop ups in new tab,new window' then theres options in there to 'switch to new tab when opened' etc.
njammy
16-Jan-14 5:43am
View
Please see my updated solution.
njammy
16-Jan-14 4:59am
View
Yes you can output types other than varchar. See my updated solution.
njammy
14-Jan-14 11:28am
View
My suggestion is use Session variable of DataSet or List<> objects.
Even better, construct classes for your objects and populate them from gridview data entry and stick them in session variables.
(Remember to clear, rebuild session variables on the appropriate first page load events etc.)
Google "Disconnected datasets", as it is a big area of discussion.
njammy
14-Jan-14 11:25am
View
I didn't think it's possible to just send once, because it's a request and response mechanism. once the response is back it is 'game over' and all abandoned.
Even in IE or other browsers, you can ask it to remember credentials, but the browser still sends the credentials on your behalf for every request/access to the site.
njammy
14-Jan-14 11:22am
View
Debug and look at the Datasource, to see its structure, and properties.
You may need to get rows by indexed reference.
njammy
14-Jan-14 11:20am
View
Please post your markup as well.
njammy
14-Jan-14 11:17am
View
Which panel is it please post it separate to your main code or annotate it/highlight.
njammy
14-Jan-14 6:45am
View
Did you try my suggestion...
njammy
14-Jan-14 4:13am
View
This looks like a good solution.
njammy
13-Jan-14 21:09pm
View
Still unclear. Share the part of code which isn't working...or explain.
njammy
13-Jan-14 20:55pm
View
Is Me.WilperDataSet's rows set to modified or added? Check the row state in that dataset.
You may need to call the insert methods manually.
njammy
13-Jan-14 20:02pm
View
Please use the edit function and re-type your question as it is unclear.
What is the problem your having? Is the redirect not working from the javascript alert OK/Cancel button? Is that the issue? Please explain clearly. Your question is more a requirement not a issue.
njammy
13-Jan-14 13:37pm
View
I already gave you a suggestion read my previous message.
Use URL Query string paramter, then pass it into the SQL retrieval code as paramater.
OR... put user entry from text box into session variable and get it in the grid page.
njammy
11-Jan-14 13:31pm
View
I suggest you keep the controls in the same page as the grid view.
But this is how it can be done:
Form1: user types search value, then on button click you do Response.Redirect("gridpage.aspx?name=" + textbox1.Text);
Then page2(grid) get the query string param :
string searchValue = Request.Querystring("name");
This is not advised to use query string parameter from one page to another to do SQL query (SQL Injection risk). so make sure you validate the query string parameter from page 1.
njammy
11-Jan-14 13:04pm
View
I don't understand what you mean. The user types into textbox the ID they want, or the name or some other field, then in code you do:
parameter(...).value = textbox1.text <-- this is the user entry.
njammy
11-Jan-14 12:37pm
View
You need to set sql command parameter value = user entry e.g. from a text box. That was just my example of hard coded id=1.
njammy
10-Jan-14 21:32pm
View
That's right just for illustration. In my example the rows states are set to modified so you can submitchanges back.
njammy
10-Jan-14 21:12pm
View
If it's readonly, why will the change event fire...
njammy
10-Jan-14 21:10pm
View
Is this a problem in other browsers like FIrefox or Chrome?
IE tends to cache some elements of web site content. try ctrl+F5 or reset browser settings/clear files. A very good tool if you didn't know is F12 key brings up developer tools. Do the clear from there as well as in control panel IE options.
njammy
10-Jan-14 21:01pm
View
What do you want to display in the pop up? just a text box? This seems pointless. Any other controls to be in pop up?
Anyway, You can add onclientclick="showPopup(this)" event to textbox and write javascript to show popup. in the JS function use hidden field to store 'this' value which is textbox id.
Inside popup, user types value and then clicks 'ok' or whatever. on 'ok' click, do JS function to hide popup and copy popup.textbox.value to textbox.id in hidden field.
Beware of this approach may cause the data to be lost on postback i.e. grid view update etc.
njammy
10-Jan-14 20:43pm
View
Can you try something, in Visual studio, go to Project > ASP.Net configuration.
Does the built in web admin pages load up? if not, try adding this to web config after opening tag of connection strings:
<connectionStrings>
<remove name="LocalSqlServer">
...
njammy
10-Jan-14 20:41pm
View
Deleted
Can you try something, in Visual studio, go to Project > ASP.Net configuration.
Does the built in web admin pages load up? if not, try adding this to web config after opening tag of connection strings:
<pre><connectionStrings>
<remove name="LocalSqlServer">
...
</pre>
njammy
10-Jan-14 20:21pm
View
In the error at line
DirectCast(e.Row.FindControl("ddlschool"), DropDownList).DataSource = DirectCast(ViewState("School"), DataSet)
is the control ddlschool null or viewstate("School") null? one of them must be null.
you should separate this logic into:
dim ddlschool as dropdownlist = e.row.findcontrol(...)
this approach helps debug better as well.
njammy
10-Jan-14 20:14pm
View
Post some more example of markup (controls) that are not enabled and your code behind.
njammy
10-Jan-14 20:11pm
View
Please explain your current page and next page more clearly, i.e. what do they do? What do you want to show in the progress bar?
As far as I know progress bar cannot be used like this. You can however show it, but it will disappear because the page is changing due to postback or redirect. Progress bar is usually for 'Loading...' message when user stays on same page and updates or loads something.
njammy
10-Jan-14 19:05pm
View
Please submit some examples of your entities concerned, the data source(s) and the functions you want to separate.
Generally, the MVC principle is to remove all action events and code from the presentation layer. You can do this simply in ASP.net by adding EF to a BL project/assembly. Keep your code separate : PL calls BL methods, passing parameters and Class objects, BL calls DAL methods/transactions and logs events. Hope this helps, but do post back for more discussion about what code you have so far.
njammy
10-Jan-14 19:00pm
View
Please post some code and example.
njammy
10-Jan-14 18:21pm
View
I agree you need to show your code and logic.
To be a bit helpful, here's a quick example that works. It can be modified to use id's and other data to get the row to delete.
///
/// Add row
///
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
string rowValue = textBox1.Text;
dataGridView1.Rows.Add(new object[] { rowValue });
}
///
/// Delete row
///
/// <param name="sender"></param>
/// <param name="e"></param>
private void button2_Click(object sender, EventArgs e)
{
DataGridViewRow row = dataGridView1.SelectedRows[0];
dataGridView1.Rows.Remove(row);
}
Generally though, before delete event, the data should be stored in at least a Dictionary object or a class as that can be added to a collection. This can be bound to a DGV and refreshed to get around your issue.
njammy
10-Jan-14 17:36pm
View
First of all, you have VB.net code in there.
Please see my example in c#. The error "dr is a variable but is used like a method." means that
1. the While loop in c# is while (lowercase),
2. Server.Transfer means that the page will change. The code to set textbox1,3.text is pointless.
See fixed code below. it works:
protected void Button1_Click(object sender, EventArgs e)
{
OleDbConnection con = new OleDbConnection(@"data source=C:\dev\test\testmsaccessdb.mdb;Provider=Microsoft.JET.OLEDB.4.0");
con.Open();
OleDbCommand cmd = new OleDbCommand("select * from client where id= " + TextBox1.Text, con);
OleDbDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
TextBox2.Text = dr[1].ToString();
TextBox3.Text = dr[2].ToString();
}
//Server.Transfer("Default.aspx");
con.Close();
}
njammy
10-Jan-14 17:14pm
View
This error means you need to pass a value for a parameter in your select query.
The parameter is @id.
Look at my example, this is how you should do it (add a OleDbCommand and set it's parameter(s)).
protected void Page_Load(object sender, EventArgs e)
{
OleDbConnection con = new OleDbConnection(@"data source=C:\dev\test\testmsaccessdb.mdb;Provider=Microsoft.JET.OLEDB.4.0");
OleDbCommand cmd = new OleDbCommand("select * from client where id = @id", con);
cmd.Parameters.Add("@id", OleDbType.Integer).Value = "1";
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds, "client");
clientGridView.DataSource = ds.Tables["client"];
clientGridView.DataBind();
}
njammy
10-Jan-14 12:06pm
View
Do you mean like a search function?
njammy
10-Jan-14 12:06pm
View
Deleted
Please explain in more detail what data you want to retrieve.
Show More