Web Forms :: Generating String / Why Data Is Doubling
Mar 2, 2010
I have a simple function that is supposed to create a string of year values(separated by a comma) from a form that contains checkboxes for a set of years.
[Code]....
The problem is, it is doubling data somehow. For example, if I check the checkboxes for 2008, 2009, 2010, it will return :
,2010,2010,2009,2010,2009,2008
But I can't figure out why it is doing this...is there something I am doing wrong?
I have an ASP.NET website in which I have to perform a certain operation. I have to displaying the ID's from the DB on menu.aspx page in this format {1:2:3:4}. The above format is not a problem and can be just be written with
[code]....
Note that I am saying that user will type this URL. I know that query string can pass the values from one form to another but this is a single web form and if I attach this ?search=yes, it should return the result. How can this be done?
I have an ASP.NET website in which I have to perform a certain operation. I have to displaying the ID's from the DB on menu.aspx page in this format {1:2:3:4}. The above format is not a problem and can be just be written with
[Code]....
But here comes my question. I have to generate this ID when the user types the query within the URL somewhat like
[Code]....
Note that I am saying that user will type this URL. I know that query string can pass the values from one form to another but this is a single web form and if I attach this [Code].... , it should return the result. How can this be done?
How to achive this using any of the data control gridview, datalist or repeater control ?the numbers 1,2,3....31 are the days in a month while "HomePage", "Maps" etc are the name of the pages and the entry below each date will show no of users visited the page. I want to show the same for every month
i have fetched required data and the output is as follows .
I am working on a small website for project management.There are around 15 database tables. Since i will be using asp.net 2.0, I wont be able to use LINQ.I need to finish the development of the website in a very quick manner.How do i generate the data access layer automatically. I found NHibernate as one solution, but it seems too difficult for such a small project.
I am writing a web form in C# using VS 2008. My form accesses an Access database that has a list of Cusomers. Each customer has a customerID. My goal is to allow the form to automatically generate a new customerID each time a user clicks on INSERT. I need it to take the highest customerID from the DetailsViewand add 1 to it in order for the customer ID's to be sequential. I am assuming I need a loop for this or maybe an Arraylist?
I am displaying the output of a LINQ query in a Detailsview control. I have a Detailsview called DetailsCaAb and a DropDownList called DropDownList2, when the use makes a selection from DropDownList2 the Linq query fetches the data CatAbstract from the table CatagoryTables. e.g.
[code]....
Unfortunately I cannot seem to control what is displayed by the DetailsView, I only want to display CatAbstract, but the details view generates another column called Items. How do I ensure only the data I want is displayed? I need a way of controlling the columns generated programmatically.
I want to generate serial number in gridview but the serial number should be equal to the count of records for a particular column(in my case No. of Villages).
I know how to generate serial number but i am unable to generate number of rows equal to the number of records of my datatable column(Village_Name---say for example 45 rows--- any no. of rows)
I am using following code to serialize class object into dataset. Storing the dataset schema in a viewstate, when I try to read the schema from viewstate getting following error.System.Xml.XmlException: There are multiple root elements. Line 20, position 2.Please let me know how to resolve this error.
I have a Gridview that I am using in a User Control. The grid loads great and my paging buttons that exist outside of the grid itself work properly. When I click my delete button inside the grid, I am getting an invalid postback message. How should I handle this? My control raises one event by the way.
In my Admin page, I have a drop down list containing all current user tables in the database. The user chooses one.
My DetailsView below uses that parameter to populate itself with data from that table. The stored procedure used to select the data passes a string to sp_executesql. The string is concatenated from a select statement and the tablename parameter. Can I do something similar for Update/Delete statements? I'm not sure of the best approach, given that I won't know which/how many fields will be in the DetailsView at runtime, and which of these are keys - the choice of table depends on the user. I think Insert will be straightforward - am I right? I would like to streamline things as far as possible. Is it possible to dynamically pass in the values in, say, a string, and get my stored procedure to understand them? And what's the best method of grabbing the values from the DetailsView in this situation?
In my current role, I support and develop a .net 1.1 website which was developed by my predecessor.
For generating reports/ invoices/ etc, the site uses a find and replace system reading a template rtf file with a stream reader and writing the output using a streamwriter to an rtf file.
I have been asked to generate a new report for the system which has many more tables than the previous reports and is generally more sophisticated.
I have taken a lot of time in trying to develop this report with not much success as the rtf formatting (e.g par for a line break) is to me quite difficult to master causing the document to crash infrequently in word (!) The rtf solution although frustrating is quite a simple format that can be managed in code. But it takes a lot of time to set up the documents...
Is there a .net code library or similar anyone is aware of that can write rtf to generate tables and other simple formatting. I am restricted to using .net 1.1
If I have the time would like to redevelop this system. I have googled for a more sophisticated system and have seen how to use html, etc. in word docs, but I don't really want to run word on the web server. What are the current best practices to generate invoices/ reports etc. from data using .net? Should I stick with this rtf method or is there an easier/quicker/friendlier way! In this regard I'd consider anything - .net 1 to 4
The application is a typical business system so any links to other resources for requirements such as a document generation system, email system, diary management (tasks to do for a specific user )
I have a xml file which is currently made manually and I have to make a functionality(UI) where user can enter the data and I have to store the data and generate the xml file dynamically in .NET.
Problem is the format of the xml file. I am not able to decide how I am going to store that data and then dynamically generate xml from that.
find the some of the extract of the code from the xml file below:
This is something I asked about a long time ago but there wasn't really a solution available at the time. There was talk of there being changes in a new roll out of EF where existing databases based on a model were simply ammended instead of being dropped and recreated every time.I was wondering if anyone knows whether or not there is something out there now that will let me retain the existing data when making changes to a model? If not, what is the best way for me to back up the data prior to a change and restore it post-change?
Now the same code when I copy it in my project having masterpage . there is no compiler error but it is genereating excel file withno data in it but in fact there is data in the grid view at runtime.
I am having one Asp.net 3.5 application with SQL Server 2005 backend. I am generating few complex crystal reports with some formula in crystal itself and complex paging and grouping constraints. Now we are planning to atomize this process. We have 10 reports on the screen so:
--user will click on each report --report get open in Crystal Report Viewer --User will generate PDF from crystal report.
Now, we are thinking to atomize this, rather than giving link to crystal, we want to generate PDF directly when that page opens rather than making above three steps. Is it possible to open Crystal report in memory, save it as PDF and close it? Well, we have data so you might think that why don't we directly generate PDF from data with the tools like iTextSharp or other but in that case what about the grouping, paging, formula which crystal handle itself?
I have to generate downloadable good looking pdf reports containing text and chart based data for a commercial application. I found out itextsharp library ( http://itextsharp.com/ ) but it isn't as powerful as I expect.
What components do you use for this kind of requirements? The price is important for me too.
I am using dynamic data entities linq to sql project. For my test project I have one table, with 10 columns and a single primary key for example. Almost all the columns are varchars.I can get the basic project up and running fine - update, delete, insert etc.ince it has no foreign keys, there are no search filters rendered. I was wondering if there was an easy way to generate a set of filters for the columns for this table. So a First name and last name search box. Is there a way to generate these filters for chosen columns and is there a way to generate these for all the columns
for example, above each of the columns in the grid there might be a text box ( I am not too fussed where the text boxes are rendered as such). Each of the text boxes will act as a filter for that column (doing a SQL 'like')