Architecture :: Adding Data Fields On The Fly?
Feb 10, 2010
I have a web app that is tracking basic medical provider demographica information (name, address, phone). If our client requests us to include gender and DOB as the fields tracked, can this be done on the fly without compiling and publishing my web app?
View 2 Replies
Similar Messages:
Jan 26, 2011
I added new profile in the webconfig file. Also added extra fields in CreateUserWizard.
Web config:
<system.web>
<authentication mode="Forms" />
<compilation debug="true" targetFramework="4.0" />
<pages theme="Theme1" />
<profile enabled="true">
<properties>
<add name="Country" type="string"/>
</properties>
</profile>
</system.web>
Cs code:
public void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
Profile.Country = Text1.Text;
//also tried doing:
ProfileCommon p = (ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true);
p.Country = Text1.Text;
p.Save();
}
The Profile/ProfileCommon gives me an error "missing assembly/Profile doesn't exsit"
View 1 Replies
Feb 24, 2011
are below all 3 points the same?
1)<boundfield>
<asp:button ....>
</boundfield> [code].....
View 10 Replies
Oct 14, 2010
I need a form that displays three columns drawn directly from a database (no problems here) as well as two fields that require some complex calculations. Not only am I lost as to how to incorporate the calculations into the control, I don't know exactly how to write the calculations. I am working in Visual Web Developer 2008 with Vb.NET.
The first of the two fields should take the sum of all payments made by a given customer and divide it by a DailyMembershipRate, returning a DaysPaid variable. It should take this variable and a CustomerSince field for that particular customer and calculate a PaidThrough field.
The second of the two columns similarly requires the DaysPaid variable described above. It should subtract the CustomerSince field from the current date and return the value in days, giving a MembershipDays variable. Finally, it should subtract MembershipDays from the DaysPaid variable, again returning a value in days, and then multiply this by the DailyRate value for a Credit/Deficit field.
I realize this is a lot, but I haven't been able to find any documentation either online or in VWD or ASP.NET texts on this topic. I could really use some fellow user input.
View 4 Replies
Mar 9, 2011
I'm successfully using SqlBulkCopy to import spreadsheet data.
I am trying to add 2 additional fields,'UserID' and the specific 'employerID' whom they're logged in as.
Both these ID's are on the page. However how do I tag them on to my column mappings statement?
These ID's aren't on the spreadsheet but I need to know whose imported the data and from where
The columnMappings structure:
[Code]....
View 5 Replies
Feb 23, 2011
I am attempting to customise the CreateUserWizard by following it in my book, but when I come to reference them in code behind I get an error saying 'FieldName is not declared' for each field i'm adding, they are present in the page with the correct ID's, am I doing something wrong?I am only trying to add a firstName and lastName field to the bottom of the CreateUserWizard and remove the need to a security question.
View 1 Replies
Dec 9, 2010
i m trying to add new field named mobile in my create user wizard control for that in my web.config i add
profile
enabled ="true">properties>add
name ="Mobile"
type ="string"/>properties>profile>
in my create user wizard using edit template i add one textbox named 'txtmobile'
nd in my cs i write
CreateUserWizard2_CreatedUser
{
ProfileCommon p = (ProfileCommon)ProfileCommon.Create(CreateUserWizard2.UserName,
true);
TextBox txtM = ((TextBox)CreateUserWizard2.CreateUserStep.ContentTemplateContainer.FindControl("txtMobile"));
p.Mobile = txtM.Text;
//p.Mobile = ((TextBox)CreateUserWizard2.CreateUserStep.ContentTemplateContainer.FindControl("txtMobile")).Text;
p.Save();
}
but it throws the error of 'object reference' nd also let me know how to store that field in db?
View 1 Replies
Jul 16, 2010
I'm using VS 2010 and have a default Register User page. I want to add a few more fields to the default user name, passwor, email.These fields need to be saved to a different table than the apsnet_Users table. I figured I could do this in the CreatedUser event but don't know how to access the text box controls I added - for example First name, last name and so on.
View 2 Replies
Jun 29, 2010
I'm just starting out with ASP.NET and I'm not sure how to go about the following:users have to input a part number into a text field. Sometimes they only have to input 1 part number, sometimes 50. I want to have 1 text field where they input the first part number, and if they have another one, they press a "more" button. Then, a new text field appears right beneath the first one. IF they have more part numbers, they just press the more button again... Is there a way to do this? If so, can someone give me any tips or hints on how to approach this?
View 3 Replies
Mar 21, 2011
I have a application that i am creating in ASP.net i need to be able to update a new column in the table users which is set up automatic with a asp.net project. I am trying to add a address line to the code
This is code that i have so far
TextBox address1TextBox =
(TextBox)RegisterUserWizardStep.ContentTemplateContainer.FindControl("Address1TextBox");
TextBox userNameTextBox =
(TextBox)RegisterUserWizardStep.ContentTemplateContainer.FindControl("UserName");
Profile.
Membership.UpdateUser(user);
how i would even update this column in the user table that i have.
how i could update the address line1 table in the database that comes with a visual studio 2010 project.
View 1 Replies
Dec 4, 2010
I am using silverlight, vs 2010, and need to write some basic functions.
Some of the functions are getting a string and find if it's odd or even, and some of them getting status from database.What is the best way doing so : Javascript, ASP.NET, AJAX?
Need an example of code, that also include some dlls/assemblies,
View 2 Replies
Feb 24, 2010
My C# web app requires the user to enter automobile information. The user can add information for one auto, or more (max 20).
My page has these text fields: Car Number, Car Make, Car Year, Mileage, VIN I have a button that allows the user to "Add More Cars" is to allow the user to add more than one car.
When the user clicks "Add More Cars", how can I dynamically display the text boxes, and keep track of how many cars the user has added (in order to load them to an array and write to database)
View 3 Replies
Jul 6, 2010
I have an SQL datasource that successfully enters customer details into a table. What it includes is the persons address. First of all we add the persons address, then we add the persons name to that address in a seperate physical procedure. i.e. on a different form.
What I need to do is try and stop users entering the same address twice. The way I have thought of doing this is by making a string field called AddressIdentity and have this contain the door number and the postcode of the address with all the spaces stripped out. Then when adding the address, it checks if this exists before adding it. However I cannot work out how to put the 2 fields together without using the codebehind file, which I don't mind doing if I need to, but I'm sure its avoidable.
Here is my code - I have only included the relevant parts:
InsertCommand="INSERT INTO [tbl_shop_client_addresses] ([FlatNo], [Address1], [Address2], [Town], [County], [Postcode],
[Country], [Telephone], [DoorNo]) VALUES (@FlatNo, @Address1, @Address2, @Town, @County, @Postcode, @Country, @Telephone, @DoorNo)"
<InsertParameters>[code]......
So how do I do it? I was trying:
InsertCommand="INSERT INTO [tbl_shop_client_addresses] ([FlatNo], [Address1], [Address2], [Town], [County], [Postcode],
[Country], [Telephone], [DoorNo], [AddressIdentity]) VALUES (@FlatNo, @Address1, @Address2, @Town, @County, @Postcode, @Country, @Telephone, @DoorNo, @Postcode + @DoorNo)"
but of course AddressIdentity is a string. Do I use ' ' marks with an & sign? Or can't I do this?? Maybe I need to use the codebehind anyway to see if the field exists before inserting it?
View 2 Replies
May 16, 2010
ive a DB in access with a single table and no primary key, actually i dont need a primary key but i can consider a date field plus another to make an index. however i want to add a counter field based on every change of date field, for instance ill have many records of 20/May and all must have the same id then when the date is different, the next group of records with that new date must show 2 etc.. is it a quick way to update my database?
View 6 Replies
Jul 14, 2010
i am uisng asp.net 2.0 built in crystal report .i already have the connection made and some fileds already on the report. i need to add few more fields to the the existing set of fields from database in the server explorer i have the field that i need but i am not able to drag drop on the crystal report.how do i add the field from datatable to crystal report
View 4 Replies
Sep 26, 2010
I have a GridView, and I want Column1 to be equal to datatable data (filled by a SqlDataAdapter). Then I have two other fields by the SqlDataAdapter (first name, last name), and I want to have those two fields combined to form Column2. I have a TemplateField for my GridView that combines the first name and last name with Eval()'s, but the GridView places this combined field TemplateField and puts it as the first column.
How can I do this so that TemplateField can go in between fields that are databound?
View 6 Replies
Mar 23, 2011
my requirement is i want to add education details having three fields
1) name of school
2)name of city
3)Degree
some persons will studied only in one school . some in 2 . aome in 3. how to add dynamically .and after that i want to show the data to admin .if there is 2 means i want to display 2 school informa
View 4 Replies
Jan 12, 2011
Similar to the "add more experience" functionality in [URL], I want to provide a "Add another location" link which should display an additional row of a set of 4 dropdowns (country, state, city, region). I'm actually using the CascadingDropDown jQuery Plugin for ASP.NET MVC [URL] for my location dropdown functionality, but I need to give the user the ability to add multiple locations. What would be the easiest way to handle this in ASP.NET MVC and jQuery?
View 4 Replies
Aug 18, 2010
I am using TempleteFields for all columns in my GridView. In that columns I am using only some fields for customization but not all.
Is there any performance issue with Databound Fields vs Templete Fields in a GridView...?
Do I need to replace the remaining columns with Databound Columns instead of TempletField columns...?
View 4 Replies
Mar 17, 2010
I want to create a user registration form, I used the CreateUserWizard control, and i intend to add more filed with the wizard interface, the fields were firstname,lastname, telephone all these with the textBox control and sex-male or female with a radioButton control, and upload photo with the FileUpload control.
After a successfull submit to the sql database, i should be able to retrieve all this informtion inluding the photo uploaded in another aspx page using any of the data control in y toolbox and resizein the photo to be 100/100 pixel size. pls could you write out the code (step by step details) to follow to implement all this in my asp.net 3.5 c# website. I have already created a table in my database, using userId as my ForeignKey.
View 1 Replies
Jun 28, 2010
I am adding text fields to a page from the database. I set the .ID to match the record ID from the database. Of course becasue the text field is on the masterpage, when I grab the .ClientID, it is ctl00 contentMain$ctl00. what I don't get is where is my ID? If I set it to say AB how do I find the textbox by AB? I thought it should have AB in the ID somewhere. ID is nothing which I don't get either. I'm looping through the controls in a placeholder like this
For Each row In dtData.Rows()
Dim c As Control
For Each c In phTextRequired.Controls
If c.UniqueID = row("CustomFieldID").ToString() Then
Again though what is in the row() is say AB but the id is way off from that.
View 4 Replies
Jul 28, 2010
So am adding fields in the code behind and now want to add required field validators. Kicker, I think comes into play becasue all this is in a master page. So even though I may set the id of the textbox to say tb4, it's no longer tb4. So when I add the required field validator and tell it the control to validate is tb4, I get the yellow screen of death telling me thtat tb4 does not exist... cause it's the long huge master page ID. What do I do?
View 13 Replies
Feb 10, 2011
I'm currently trying to work out the best way to build this web application, which will then be intergrated on other systems, such as WinForms, Intranets etc.
We hope to include the usual layers i.e. DAL, BLL, BOL and UI but I have been experimenting with Entity Framework 4 and WCF Data Services and managed to get something in place where I was using WCF as a gateway to EF4.
i.e. Adding a Service Reference to my project and then using the EF4 context and writing LINQ queries against the DB
e.g.[Code]....
Now with the current setup I would still need to write a DAL Class Library, that interacts with the Data Service, because as I said WCF Data Services only seems to be a gateway, I can't see where to put the code (above) in the Data Service and then how I could these methods.
My questions are: 1. How do I develop a WCF Data Service in such a way to allow this behaviour - I know how I could do it using ASMX web service, something like [Code]....
2. If I am to use WCF Data Services, how is serialization handled (if at all) - again I know how to do something in ASMX web services
3. Again, If I am to use WCF, how do I add Security and only allow my applications to access the web service - for obvious reasons
4. Would it be possible / logical to also include the Business Logic Layer into the web service?
View 4 Replies
Feb 8, 2011
I have a sql data souce that returns several columns of data, and they are displayed in a DetailsView on a pretty simple vb.net page. I'm stuggling with one field though for the details view.
It's a template field, and if ClientType=1 (this value is determined else where on the page), then the label in the template field should have Text='<%# Bind("ClientName") %>', but if the ClientType = 0, then the label in the template field should have Text='<%# Bind("ClientTemporaryName") %>'
How do I tell the details view to set the text for ClientName to one or the other?
[Code]....
View 3 Replies
Feb 25, 2011
I have a relatively complex dataset (numerous tables, some with multiple records) generated from reading in an XML file. I need to connect said dataset fields to an ASP form. At the moment I'm assigning them manually, like so in the pageload:
txt_first_init.Text = formData.ds.Tables["phrmHdrKey"].Rows[0]["first_init"].ToString();
txt_last_name.Text = formData.ds.Tables["phrmHdrKey"].Rows[0]["last_name"].ToString();
ddl_pregnancy_flag.SelectedValue = formData.ds.Tables["pPhrm"].Rows[0]["pregnancy_flag"].ToString();
And conversely when it's time to submit.
formData.ds.Tables["phrmHdrKey"].Rows[0]["first_init"] = txt_first_init.Text;
formData.ds.Tables["phrmHdrKey"].Rows[0]["last_name"] = txt_last_name.Text;
formData.ds.Tables["pPhrm"].Rows[0]["pregnancy_flag"] = ddl_pregnancy_flag.SelectedValue.ToString();
I did some looking into binding the textboxes (and dropdownlists, and checkboxes, and and and...) directly, but it seemed to be too many formats to use.
So this works fine, but as the number of fields increases, those load and unload lists are going to get unwieldy.
View 1 Replies