Microsoft Chart Control generates a different visual then the set property. Property based it always shows correct value but if you open the generated chart with graphic software like Photoshop it shows pixels are not matching with the set property.
I found this bug while trying to retrieve all InnerPlot Positions into a HiddenField. Based on this bug right now, there is no way to get correct absolute position of ChartAreas or InnerPlots.
I have two tables.One is registeration table in which we have city,state,country and another is location details table in which we have city(multiple values seperated by commas),state and country also same as city
We have rdl report and passing a multiple paramter values through URL. When the passed values exists in report parameter values then report displayes properly.
But when we pass the values through URL which doesn't exists in report parameter value then it throws an error saying parameter value is missing.
The reports db and the application db through which we display the reports are different. how do we address this issue.
The Company table contains any Company with a potential relationship to a "Member". For example:
Companyabc = C (Competitor) Companyxyz = S (Supplier)
When a new Member record is entered, the user selects from two dropdowns: CompanyType (Supplier, Retailer,Competitor); and CompanyName. The CompanyName dropdown is populated depending on the value selected for CompanyType so if the user selects "Supplier" for CompanyType then only those Companies with a CompanyType of "S" for Supplier will be listed in the CompanyName dropdown.
The use can enter up to 10 CompanyType/CompanyName combinations. When the record is saved, these CompanyType/CompanyName combinations are saved in the Member_Company_Link table. One record for each CompanyType/CompanyName combination is entered in the table.
The problem I'm having is in the retrieval process. I have a "search" screen in which users can select certain criteria to list Members by and one of them is CompanyName. For example they want to see all Member records with "company xyz" as a Supplier and/or "companyabc" as a Competitor. Because each Member can have multiple Supplier and/or Comptitor records I can't figure out how to loop through them to match on the value entered by the user. If Member1 has 5 corresponding records in theMember_Company_Link file and 4 of them contain Companies that are Competitors (Competitor1, Competitor2, Competitor3 and Competitor4) and the search criteria is to find records containing "Competitor3" how can I loop through the values in the Member_Company_Link file for each MemberID to see if there is a match for "Competitor3"?
I know this post is too long and most of you will have ignored it by now but I'm hoping someone will have a clue because I've already spent more than a day trying to figure it out. It seems I have to store multiple values in an array but I have no clue how to do this.
i got my checkbox control in each row.actually my problem is i bound checkbox in a gridviw and i need those checkbox are checkd if database values are match.i do it like below
[Code]....
but problem is only one checkbox is checked.in page_Load i bind gridviw in ROwDatabound event i check Duecode in another table.so i need only matching checkbox should be checked.
I am getting int values from the stored procedure. But when i bind this datasource with the gridview i am seeing the values being converted into float. i am using Text='<% # Bind("Quantity") %' I wanna that to be displayed as int, with out zero'seg: let the value be 233, when i bind that its getting displayed as 233.00
in a web form, i am having two drop down controls, and in the first one control i am having, state names like some thing, and in another i have to fetch the concurrent city names for the first control, like if i select city name as 'A' it must fetch the related city names for the 'A' how could i do this.
i am using a gridview in my web page,i used to bind the database records to the gridview..my columns are name,empid,company name,pl leave,sl leave,total leave taken here total leave taken is not a database fields,in the page i want to fill the records once loaded pl leave and sl leave is added and display in the total leave taken column..it working properly when all pl ans sl columns fill with numbers,if some pl and sl leave having blank values.it showing an error like input sting was not in correct format..this is my code
Prior to using a ViewModel, I could easily pass the "soon to be edited" object directly to the view without needing to fuss over setting individual properties etc as the View conveniently accepted the Employee type directly..
[HttpGet] public ActionResult EditEmployee(int? id) { EmployeeRepository ER = new EmployeeRepository(); Employee SomeEmployee = ER.GetEmployee(id.Value); if(SomeEmployee!=null) return View(SomeEmployee);
But now I'm using a ViewModel with DataAnnotations attributes applied over the top of various properties for validation purposes. Which creates a problem.. After fetching the "soon to be edited" object from the db, setting the ViewModel's values is suddenly a whole lot more complicated. I can't simply pass the retrieved object straight to the view, as the View now expects the VMEmployee type instead. I would like to be able to do something like:
[HttpGet] public ActionResult EditEmployee(int? id) { EmployeeRepository ER = new EmployeeRepository(); Employee SomeEmployee = ER.GetEmployee(id.Value); if(SomeEmployee!=null) return View(new VMEmployee(SomeEmployee));
All paths seem to lead to a huge constructor which manually sets the values of each individual property. But I never had to do that before when I wasn't using a ViewModel. Model binding was a blessing! My objects also have complex child objects, which my form is also collecting values for, so this would be a huge/verbose task against DRY principals. I don't even really want to use a ViewModel, but am forced to because I need two different DataAnnotations rule sets for different validation scenarios applied to the same object.
All I want to do is be able to have two different DataAnnotations rule sets for different scenarios. I.e. public-facing www site vs internal-facing admin site. DataAnnotations doesn't seem to be flexible enough to easily cater for this common need. I've tried AutoMapper, but it throws an error saying it can't map my object types, I suspect because Employee was auto-generated by LINQ to SQL. What is the most elegant way to achieve this while sticking to DRY principals?
I would rather specify fields in my code behind than embedding them in the .aspx page.
I also have a subtotal label control in my repeater that I would like to populate its text property by mutiplying two of the database values e.g productprice * unitprice shown in my repeater.
I need to do this in code behind, looping through the repeater. Any idea of how I can do this in C#?
I wanted to know if we can pass values from Parent page (in this case from Default.aspx page) to the user control and maintain those values on subsequent "Add/Load" of user control.
So in short, if I click the "Add" button it loads my "webusercontrol" and also I am able to pass my default.aspx dropdownlist value to this dynamically loaded user control and assign it to a "Label or Textbox" which resides in my "webusercontrol", now the problem is that the value doesn't persists! What I meant is , when I click "Add" button again the "webusercontrol" gets loaded again perfectly but now all my "Label's" in webusercontrol has the new selected value from the default.aspx dropdownlist.
So say for instance I have a Dropdownlist in Default.aspx page with Values "Apple, BlackBerry, Nokia" and initial value to be passed is "Apple", I click the "Add" button, now my "Label" inside webusercontrol has the value "Apple", perfect! Next when I click "Add" button again and select a different value to be passed this time say "BlackBerry" now I have 2 webusercontrol loaded on the page, so that means I have 2 "Labels" with different ID's, but now my first Label initially had the value "Apple" because that's what I had passed and now when I passed the value "Blackberry" both the labels of my webusercontrol has the value "BlackBerry" instead of one being "Apple" and another "BlackBerry"
Is there a way to resolve this issue? may be Dictionary List?
Updates to the edited item are not passing the new / updated values but rather the original values. And I can't for the life of me figure out why when I change the original value in an edit textbox and post the update the new value is not being passed. I get the original value. Perhaps fresh eyes can spot the problem. This should be super basic but apparently I'm missing something.
Here's the code for the Item and Edit templates. The code behind is below this.
i take data from Sqlserver database , and my prblem is that i want to get old and new values from gridview and base on that i want to change there background colors .. i try gridview rowupdating , editing ,updated Events but when i debug no break point hit and there was no value in ViewSate that i declare ,
I hv a filed in db having 60 values. I want them to be displayed as checkbox values on my UI.but i want those checkboxes as 15 values in 1 column.15 in 2nd col.15 in 3rd col.and last 15 in 4th coln. how to do it?
I am working on asp.net mvc using linq to sql. I have to login my application only if the user registered (in register view page).I need to know how to compare the entered login and password values with registered values
I am sending querystrin values over pages, but the problem space appear after some Valuse ,Here is the code I am using: aftre ("qud") value it adds a space i don't know from where,, so it gives error because it would be a fault value!
I was told to use a Repeater control in what I am doing which is a "Data Entry" screen with ASP.NET controls -a standard "address" like form. In cases, the fields on the form will repeated twice, once for the original values, one for the changed values. I have not used this control before but it seems like I have to bind to a database. Instead, I have an Entity object that has been obtained via a Repository. Can I bind to an object like this?