Architecture :: Creating A Simple Backend Without A Database?

Feb 11, 2010

I want to start creating sites with simple backends! I don't know much about databases though and I don't want to jump straight into creating sites with databases anyway. So I want to find out what the best way of creating a simple backend without using a database is.

I have an asp.net webpage which is a prices page detailing the prices of services at a hair salon. The prices change every 6 months so I want to give the client a simple backend so he can update the prices himself. The backend will just be a table of inputs populated with the current prices which can be changed and then click 'save changes' to update the site.

Now what is the best way of implementing this?

A) In the prices page, hard code an html table, within each cell code a <span> tag with an id for the price that will go within the span tag like id="menscut" and within the span tag hard code the price of the service. Then wirte a C# class called 'edit' that is used when the 'save changes' button is clicked on the backend page. When 'save changes' is clicked the 'edit' class parses the prices.aspx page and finds <span id="menscut">£20</span> and then changes it to <span id="menscut">£22</span> (or what ever new price has been entered in the backend) and then saves the new edited prices.aspx page over the old one on the server.

or

B) Don't hard code prices into the prices.aspx but instead store the prices in a seperate .txt or .xml file. Every time the prices.aspx page loads it runs a class called 'populate' which extracts the prices from the .txt file or .xml file and inserts them into the table in the prices.aspx page. And now the edit class instead of editing the prices.aspx page it edits the .txt or .xml file.

So which of those ways is better, or if they are fairly even pegged what are the pros and cons of each?

Or are there any other options I haven't thought of?

View 3 Replies


Similar Messages:

Architecture :: Creating A Separated Class For Database Connection?

Dec 10, 2010

i have the following code:

[Code]....

I was trying to implement as above. How can i call this class from the code behind of my page, and call the methods Open and Close connection ?

How do i instantiate the object ?

View 5 Replies

Web Forms :: .Net 3.5 Site Using C#, With No Database Backend?

Apr 13, 2010

I think I already know the answer to this but I think you know more than me so best to ask :)I've got a basic .Net 3.5 site using C#, with no database backend.I've had a request for a function to be added to some forms for people to be able to save the forms and come back later to finish them off.Is this possible?I would think not without a database backend to save it too,

View 3 Replies

Architecture :: Making Simple Menu In Using C#.net With Css?

Dec 8, 2010

anyone have creating a menu in asp.net in c# without using the codebehind...

here's my simple menu.

<div>
<ul style="margin-left: 0%;">
<li><a href="#" target="_self">e-SERVICES</a>
<li><a href="#" target="_self">Forms</a>
<li><a href="#" target="_self">Patient Eligibility</a>
<ul><li><a href="patient_1.aspx" target="_self">Female Only - Grade 01 - 11</a></li>
<li><a href="patient_2.aspx" target="_self">Female Only - Grade 12 - 18</a></li>
<li><a href="patient_3.aspx" target="_self">Male Only - For Dependents</a></li>
</ul>
</ul>
<li><a href="contract.aspx" target="_self">Recontracting Notification</a></li>
</ul>
</li>
</ul>
</div>

my problem is on how will not appear some of my menu is the user doesn't have any access...

for ex. in patient eligibility menu - female only - grade 01 - 11 (male and female below that grade cannot seen this menu).

View 1 Replies

ADO.NET :: Managing TypedDataSets When There Is A Change In Backend Table / Stored Procedure / Database Schema

Sep 15, 2010

if there is any easier way to synchronize the TypedDataSets with the chages made to backend Table / Stored Procedure schema. I use Typed DataSets in my project extensively and I found them very useful and easier to code, but difficult to maintain

The difficuly I have always faced is whenever there is a change in a backend database table structure or stored procedure that is linked to any of the Typed DataSet in our project requires to recreate whole DataSet again by scrapping the old one. The backend changes will not be reflected unless and untill you recreate the whole stuff again.

Is there any easier way to synchronize those typed datasets with the changes made to backend database schema or any other workaround that will not required to recreate the whole DataSet again.

View 2 Replies

Architecture :: Developing A Simple System Notification Mechanism

Nov 22, 2010

I'm looking for a simple way of developing "System Notification" in an ASP.NET website, which will consist of two parts: Part 1 - The administrator with go to a special page and enter 3 elements for the notification:

Notification Text (e.g. "System will be down for maintenance next Sunday 11/26/2010 from 1:00 AM to 1:30 AM Pacific Time) Starting date/time when the notification should be displayed (e.g. 11/23/2010 6:00 AM) Ending date/time when the notification should be displayed (e.g. 11/26/2010 1:30 AM) Part 2 - Once the user logs into the website within the above timeframe, the system notification message will appear on the home page. What would be a good architectural location for this?

- A table?
- An html page?
- Part of web.config file?
- A new notification.config file?
- Where else?

View 2 Replies

MVC :: Creating A Simple Message Forum?

Jan 18, 2011

im messing around with MVC3 and Razor trying to learn what i can here. Im trying to create a very simple post and replies site while learning all this new stuff.

[Code]....

I have two tables one for messages and one for replies. @model MvcGroupie.Models.Message this starts off the page but i cant add @model MvcGroupie.Models.Reply or it wipes out the other. I tried using a partial view as you can see to do this and that fails too.

So i cant then add

@Html.EditorFor(model => model.replyBody)

View 3 Replies

Web Forms :: Create A Simple Class Based One Tier Architecture

Mar 20, 2014

I am beginner in asp.net / vb.net and I developed a web application for inventory management. here I have my insertion procedure that I entered in my code behind all the different page of my application. My problem is the following:

* I would like to put my procedure in a class that I will call on my different page * how to create this class * how to call this class on my pages

here is my procedure:

Private Sub reqinsertion (ByVal sreq As String)
         Dim con As New System.Data.Odbc.OdbcConnection ("Dsn = dshealthboard")
         Sun ocommand As System.Data.Odbc.OdbcCommand
         con.Open ()
         ocommand = New System.Data.Odbc.OdbcCommand (sreq, con)
         ocommand.ExecuteNonQuery ()
         con.Close ()
     End Sub

View 1 Replies

Web Forms :: Creating Simple Whiteboard With Dynamic Updates Between Connected Users

Jul 16, 2012

I need to create a very simple whiteboard with dynamic updates between connected users.

While doing research i hit through a link: [URL] .... which is providing same functionality and it was impressive at first look w.r.t functionality.

What will be required to create such a whiteboard with dynamic updation.

View 1 Replies

Architecture :: Creating .net Forms On The Fly Not Using InfoPath?

Jan 25, 2011

I'm currently looking into a project where specific users can create web forms on the fly and save them as templates whcih are data bound.I know InfoPath has this ability; but you need SharePoint unfortunately we do not have this. I have looked into XForms, but found nothing helpful within the .net arena.Has anyone done something similar or know of a product within the .net arena which could be used.

View 1 Replies

Architecture :: Creating A DB Connection In My DAL Class File?

Feb 17, 2010

Below is my class file.

[Code]....

View 1 Replies

Architecture :: Process Of Creating An Audit Trail System?

Jun 9, 2010

I am in the process of creating an audit trail system. Simple enough. Certain fields require audit trail. What is the best design concept to allow this to work in multiple applications without having to change much? I would of course leave it to the admin of the site to add what fields should be audited, but the logic is the problem. Would implementing the interface IComparable be a place to start? My initial thinking is to compare 2 arrays against eachother and do an insert of what fields are in question. Array1 are the fields in the form, array2 are the fields from the sql table that require auditing.

View 8 Replies

Architecture :: Creating Each Class Library Project For Interface?

Jan 11, 2010

weather to create each class libaray project for Interface, Service, Model, DTO, Repository ?

View 1 Replies

Architecture :: Creating, Populating And Accessing Multidimensional Arrays?

Nov 14, 2010

I've created 2 multi dimensional arrays (2 dimensions each), I want to feed them both into a function, and I would like the function to spit out an array or list containing both of them as arrays, so I can use them as they were before they went into the function.

The way I've done it at the moment is probably very inifficient and I'm having trouble accessing it properly.

What follows is my attempt to put the 2 arrays (attackerarmy and defenderarmy) into a new array called armyresults and adding an additional dimension to tell me if the record belongs to the attacker or defender:

[Code]....

Since I've already got the 2 arrays I want in the function, I've rather not inefficiently force them into a new array, only to try to re build them again when they come out of the function.

how to out 2 arrays of unknown size into an array of arrays for the return statement of my function, and then how I can access those individual arrays so I can easily copy them back out into their original form?

View 1 Replies

AJAX :: Creating Simple Autocomplete / Taking One Textbox Adding Autocomplete Extender?

Sep 29, 2010

I'm creating just simple autocomplete sample.

taking one textbox adding autocomplete extender as

<asp:ScriptManager ID="ScriptManager2" runat="server">
<Services>
<asp:ServiceReference Path="WebService.asmx" />
</Services>
</asp:ScriptManager>
<asp:TextBox ID="TextBox1" runat="server" EnableTheming="True" ></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" MinimumPrefixLength="1" ServiceMethod="GetCountryInfo" ServicePath="WebService.asmx" TargetControlID="TextBox1">
</cc1:AutoCompleteExtender>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />

Also creating web services as "WebService.asmx" & code inside this file is that

<%@ WebService Language="C#" CodeBehind="~/App_Code/WebService.cs" %>

------

then in Webservice.cs file i write code as

public class WebService : System.Web.Services.WebService {
MySql.Data.MySqlClient.MySqlCommand cmd = new MySqlCommand();
MySql.Data.MySqlClient.MySqlConnection con = new MySqlConnection();
//MySqlDataAdapter da = new MySqlDataAdapter();
MySqlDataReader dr;
public WebService () {
//Uncomment the following line if using designed components
//InitializeComponent();
}
[WebMethod]
public string[] GetCountryInfo(string prefixText)
{
int count = 10;
string sql = "Select * from tbl_patientmaster Where P_NAME like '" + @prefixText + "%'";
con.ConnectionString = System.Configuration.ConfigurationManager.AppSettings["HMSDBConnectionString"].ToString();
con.Open();
MySql.Data.MySqlClient.MySqlDataAdapter da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, con);
da.SelectCommand.Parameters.Add("@prefixText", MySql.Data.MySqlClient.MySqlDbType.VarChar, 50).Value = prefixText + "%";
System.Data.DataTable dt = new System.Data.DataTable();
da.Fill(dt);
string[] items = new string[dt.Rows.Count];
int i = 0;
foreach (System.Data.DataRow dr in dt.Rows)
{
items.SetValue(dr["P_NAME"].ToString(), i);
i++;
}
return items;
}

this code is not working

View 1 Replies

Architecture :: Creating A Comments Page For Users To Review And Comment On An Article?

Dec 12, 2010

I am trying to create a comments page for users to review and comment on an article. I have 2 buttons on each comments posted by users; "Like" and "Don't Like". I am stuck with how to track which user voted already for a given comment. I am thinking of two options and would like to know if they are they way to go or is there a better solution.

Option 1: I have created a table in my database with stores, the comment id, the userid of the user who rated it and the value "like" or "don't like". So each time I have to query my table to find out if this user indeed vote for a given comment. The table unfortunately grows exponentially!!

Option 2: I store the commentid, userid, and "like" or "don't like" value in a cookie on the client's machine. I read the cookie and find out if the user has already voted on a comment. This is proving to be VERY quirky with cookie expiration, growing cookie size and also multiple users on the same machine.

In either way, my test case of ~1500 users, and 2 Million comments, this is getting to be HEAVY on both methods. Is there anything better?

View 3 Replies

C# - How To Get A Simple String From A Database

Feb 10, 2011

The following code does not work. There is only 1 row in this table. How do I just get the statement that the sql would return?:

SqlConnection conn = new SqlConnection(connectionStringArg);
SqlCommand command = new SqlCommand("select applicationname from tbl_settings");
command.Connection = conn;
conn.Open();
string simpleValue = command.ExecuteReader()[0].ToString();
conn.Close();
return simpleValue;

View 6 Replies

Architecture :: Binding Of Gridview With Database Versus XML Layer / Database

Apr 13, 2010

I am having serious performances issues with gridview + tabs. Its very slow.. I was thinking to create a XML based logical layer between my database and UI.

1) Will it be useful if i use webservice to get data from database to poppulate gridview?

2) or Use xml + some service (need advice on it)

View 3 Replies

Security :: Simple Authentication With Custom Database?

Nov 10, 2010

I created a database for user authentication. After I pass loging parameters to the stored procedure in the database and they return a user ID for that user I use the following line for authentication:

[Code]....

User gets authenticated but the problem is that ASP.NET does not recognise the user as authenticated until the page is refreshed.

View 5 Replies

SQL Server :: Code For Simple Database Connection In 3.5?

Aug 8, 2010

.net frame work. I know about few controlin .net and I have tried few programs also. Now want to learn a databaseconnection in .net so please provide me one easy example of such program.

View 2 Replies

SQL Server :: Simple Union Query / From Northwind Database

Aug 4, 2010

I am a .net developer.I am not that strong in SQL.I need a simple query.This is from Northwind Database.

select 'Select All' as CustomerID,'Select All' as City union(select CustomerID, City from Customers
order by City)

i need to get output like 1st row should be Select ALl Select All and next rows should be output of this stat..(select CustomerID, City from Customers order by City)

i am not getting this...i can do by keeping the second query result in temp table and then using union... but i am looking without temp tables or simple query.

View 2 Replies

Access :: Create A Simple Web Form To Query Database?

Jun 8, 2010

I'm new here and really, new to asp.net except the very basic things.

I am trying to create a very simple (I think simple) web form with five textboxes and three dropdown boxes and one submit button. The user enters information in the textbox fields and selects from the dropdown lists (which are populated from the database), hits enter and the database runs the query and returns information on a separate page (or can it return to the same page via panels?) The original page returned to a separate page using server transfer.

I have this page already existing in asp but feel that it would be much better served in asp.net.

Can someone point me to a post where I would guess this has been answered many times?

How do I submit the new data to the database, update the records and return the query?

View 2 Replies

Data Controls :: Use Simple Text In Label That Bind From Database

Sep 3, 2013

according below theards

[URL]

I used .Replace(" ", string.Empty)

to doesn't show   on textbox

now I want use above code for lable in design view

<asp:Label ID="lbldes" runat="server" Text='<%# this.processText(Eval("Description")) %>' CssClass="lbldes"></asp:Label>

How I can do it

View 1 Replies

Data Controls :: Simple Sample Programs Using Barchart From Database

Jul 29, 2013

Need to show the barchart for results of people visited the site from database using stored procedure....

View 1 Replies

Forms Data Controls :: Simple Search Function On Records In Sql Database?

Aug 2, 2010

Is there an easy way to search all the columns in the database?

I was the user to input a search word in a textbox and then search all of my database. I then want an array full of the primary keys of all of the records that had the search word contained somewhere in the record (i.e in any of the record fields).

This sounds really simple to me but I can't figure out how to do this and can't find examples online.

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved