I've mad a function, that has a result of 24 rows.So the first row is LE1, the second LE2, the third LE3 ......But how can i programmically change the row.LE1 ? It should be LE + i ...Take a look at the code:
I'm creating an quiz application which queries the database and extracts the questions and choices. I use dynamically created controls such as a checkbox list and fill the values dynamically. How do I do this? Right now I have these functions:
array_random_init(); this creates a 10 element integer array from 1-20 - extract_question(i): this extracts a question indexed at i in DB, I created the controls and set the appropriate text in this function. - validate_question(i); this is called by button_click and validates the question i according to DB.
I understand I have to recreate the controls in Page_init on postback, but what should it look like? Do I need to add "if IsPostBack" in page_init, or do I create the controls in page_init() and reset their properties in page_load when I use extract_question(i)? Also, I cannot seem to clear the selected boxes on postback, I added page directive "enableviewstate=false" but it doesn't work.
I have until now always stored my lists definitions for labels and values for dropdownboxes in my own defined Xml files. These lists labels I then match with a language file (.resx) ..... so far so good but now I am starting a new project. Should I continue with my old habbits or is there a better way of storing label constants for my dropdown boxes throughout my application?
I would be happy skipping my read and write rutines for my onw structure if there is a better dedicated one for the purpose.
I have 40 Drop Down Lists that I want to fill using an XML file. Based on what is in the XML file i will add an item to a specific Drop down list. I don't want to manually loop thorugh each control by name. the ids for all of the controls start with DDLSession and then they have a suffix such as A2 or B4. What I want to do in the C# Code is ads items dynamically to the control like this:
I want to create a mailto anchor tag at runtime. Is this possible? I've tried this:
[Code]....
Neither of these worked. I tried adding the "mailto:" in front of the {0}, but this just became part of the perceived URL. I read a post online about using data attributes to add the value as a property of a class, but I can't do that, as I'm stuck using .NET 3.5 for this project. I honestly didn't think this was going to be such a big deal. I just want to populate the email address of the anchor tag with a variable value.
I have a modalpopup extender that is brought up if the user presses a button. This is fine and the user can enter the data. There are a number of textboxes and dropdownlists. However, I have a gridview which I want to bring up modalpopupextender so the user can edit an entery. How can I set the data to the controls? A dynamicpopulate extender will repopulate the modalpopupextender with all the data. It doesn't make sense for me. Is there anyway I can populate the data with c#? Also can I assign two buttons to call the modalpopupextender?
Well I Am Working On A Client Project Who Was Earlier Using A Software Developed On Foxpro database And Now I Am Developing Advanced Reporting Based On Same Data Of Existing Database
I Am Prohibited To Create New Database, I Have To Use Existing Database Now Problem is That There Is A Report Which Require data from multiple database
database are related Like This
Database (a) 1 Column is Common in Common In Database (b)
database(b) 1 column is common in database (c)
like that
what i am doing is that, I First Filled A Dataset With Required Value Then I loped This Dataset Row For Value On Which I Have To Get Data From Another Database Again I Stored new data in another dataset and After Looping, I Merged It With Previous One.
If i use the multi delimited than error shows.How to use the multi delimited.If i run the code to to load the text file given in above show the bellow error
Input array is longer than the number of columns in this table.
I have 3 text boxes where a user can enter numbers. How do I dynamically add the 3 text boxes and show the sum as a label. I also need to make sure that the user is entering numbers. I am using c# and new to .net programming.
I have a simple user control which contains a textbox and a dropdownlist. I need to add this control multiple times to my page then save the details to my db, validating each control. When they re-enter my page I need to load the user control for each record in the db populated with the data they entered. They can then edit the data, delete the row or add new rows.
I'm trying to find the cleanest most efficient way to accomplish this. I realise I would need to re-add the user controls after each postback re-populating the data. Would the best way be to add each row to an arraylist or list of type object, save it to the viewstate and re-add the controls with data on postback, or is there another method which would suit?
I'm looking to add controls dynamically to a table across multiple functions. I'm trying to convert this from a C# app to a web app using asp.net, though this is my first time using asp.net with no web development background. I read the creating tables dynamically in the FAQ but I'm still not sure how to do this.
When pressing the submit button on my form, it will create a table in a place holder. Eventually I would like it to generate urls based on the users input and do this in a function other then the one I created my table in.
In my C# app I was able to add text to a listbox using: lstOutput.Items.Add("Text"); across multiple functions but I'm having trouble doing this with a table.
I understand that my table is a local variable in the submitButton_Click function, but how do I make it global to add rows, cells and controls to it in other functions?
Scenario: a user must fill in some data in mutiple controls (textbox, etc) and after that all these values must be passed to a next page. The number of controls is defined in a database. This can be different each time so I need to find a way to dynamically pass values through response.redirect("page.aspx?var1=value1&var2=value2......");
I have a .NET 1 web app that is using a Oracle database, the web app has a page of table names that allows the users to select, there are 101 tables listed on the page. When the user clicks on a table name, it takes them to a page that shows user friendly column headers, the table data, etc. Is there a way to use one GridView to do this and show the user friendly column headers instead of creating 101 pages or 101 user controls and show that control based on the table passed into the page?
for example: the user clicks table 22, I want my gridview to look like this
Buyer's Name State City Zip Code Phone Number
if they click table 55 I want them to see this
Product Wholesale Price MSRP Sale Price On Sale (check box)
and so I, I would like to use 1 gridview on one page if possible and build the grid on the "fly", We have the user friendly column headers in a table.
So my questions are:
is this possible, if so, what is the best approach in doing this
from a scalabilty level and maintenance level, would the 1 gridview be worth for all 101 (and growing tables), or would building a seperate user control for each table be better?
i have a dropdownlist contaning years..now i want to connect my database by dropdown selection.if i select 2013 it will connect 2013 database ,if i select 2014 it connect 2014 so on..
I am VB.Net Windows Application Developer Now i am going an ASP.Net Application. So, the Problem is that in Windows Application i Code this Project like given Below Actually i am Using SQL Server as DataBase and Store Procedure as Query.Becuase i had tried to control the ASP.Net Data Grid with Loop and i Failed to Control it with this method
Private Sub btn_Ok_Click(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btn_Ok.Click Fill_dataset("Sel_MovNames", "Tbl_MovNames", Convert.toint32(cmb_MovID.SelectedValue)) [code]...
Protected Sub btnAddRow7_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnAddRow7.Click Dim tableRow As New System.Web.UI.WebControls.TableRow Dim tableCell As New System.Web.UI.WebControls.TableCell Dim textBox As New System.Web.UI.WebControls.TextBox tableCell.Controls.Add(textBox) tableRow.Cells.Add(tableCell) tbl7.Rows.Add(tableRow) End Sub
but it only adds one row dynamically. After the first addition, more clicks to the button will not add more rows.
I have a table in SQL Server which gives me a list of products (PRODUCT), and the products category (CAT). Right now I am putting all the products in the same ListBox:
But I need to create as many listboxes as there are categories, and distribute those products according to the category. Categories might be added or removed so I need to create them dynamically. So lets say the table has 5 products in category 1, 4 products in category 2 and 7 products in category 3, I would need 3 Listboxes created. The first with 5 items, the second with 4 and the last one with 7 items
I hope this is in the right sections....if not please feel free to move it. Does anyone here have examples of how to create multiple text boxes dynamically based on a search result? For example A table has 5 rows. how do I output to the screen 5 text boxes? and then get their details later? (so in a week if there are 15 rows in the table , then 15 text boxes are output) also what would be a good search term on Google for this so I can try and find other examples as the search terms i was using returned zip
I want to create a page that will dynamically change the images displayed, based on which link the user clicked to get there. For example I have different movies listed and when you click a link for one of them it displays all the images for that movie. I need it to be on one page because at the moment I have hundreds of pages and its very hard to manage. I have the images stored in BLOBS on SQL Server 2005. I can retrieve all the images for a certain category and store the Image data for each one into a list of images. What I cant do, is display the images on the page. I can display one image by using the queryString to get the image by ID, then putting the Eval code into an asp:image, but I dont know how to do it for multiple images.
I'm currently in the process of creating a webshop. This webshop supports theming, but I also want customers to choose a lay-out. I can create multiple masterpages and create a handler to dynamically set the correct master page. But some components, like the shopping cart, are controls which have to be present in the master page and are also used in the aspx pages. The shopping cart control for instance, has an Update method which is called whenever the user adds a product to their cart. So the question is: can I somehow create a default masterpage which has all the components on it, but still be able to create multiple lay-outs. And how should I reference that master page from the aspx pages? I also thought of creating an Interface class which defines the masterpage and it's public components, but I don't know if I can reference an interface from aspx pages.