Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Stephen Adam

@Stephen Adam
About
Posts
8
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Roles Based Document Management - Any Tutorials?
    S Stephen Adam

    Hi there guys n girls, I am currently developing a document management system. There are a flexible number of roles and each document can have its access rules set so it can only be accesssed by users belonging to certain roles. Each user can belong a a number of roles too. So in essense there is a many to many relationship between roles and users and a many to many relationship to documents and roles. I'm using the built in .NET membeship / role features and was wondering if anyone had come across a tutorial which might cover this kind of thing. Really want a good point of reference to implement best practise and not found anything on the web yet which covers exactly what i'm after. Thanks in advance Steve

    "Gödel proved that any formal system that defines the primitive recursive functions must be either incomplete or inconsistent. In particular one could not prove from within the system that the system itself was consistent even though the question could be formulated within the system."

    ASP.NET question csharp tutorial

  • Hosting Advice - Domain Registration & Option To Run ASP.NET Sites
    S Stephen Adam

    Thanks for the advice guys, I checked out network solutions - dead cheap names but they wanted $12 for redirecting and $19 for a mailbox, seems a lil expensive for the extra's or am I just being picky? Cheers

    "Gödel proved that any formal system that defines the primitive recursive functions must be either incomplete or inconsistent. In particular one could not prove from within the system that the system itself was consistent even though the question could be formulated within the system."

    The Lounge question csharp asp-net hosting business

  • Hosting Advice - Domain Registration & Option To Run ASP.NET Sites
    S Stephen Adam

    Hi guys, Not sure if this is the right place to put this, but tis not exactly a coding issue and i'm really just looking for some general advice. I'm looking to register a domain name with a company who can also provide ASP.NET if I need it too, this wont be a business site so it does not need 100% uptime - just not to be run by idiots. Price is pretty important too. Any advice? Cheers

    "Gödel proved that any formal system that defines the primitive recursive functions must be either incomplete or inconsistent. In particular one could not prove from within the system that the system itself was consistent even though the question could be formulated within the system."

    The Lounge question csharp asp-net hosting business

  • Using GridView and In Memory Data Stores
    S Stephen Adam

    Heya guys and girls, I am writing a CMS page for a quiz and want to use the new GridView control along with an in memory data store as a datasource. Here is is how I would like it to work. The user logs onto the CMS quiz page to add or edit a quiz. The quiz can contain any number of questions and answers and once the user has added a title for the quiz and as many questions / answers as they want they then move on to the next page to preview / confirm results. The problem with using a GridView in the classic way would be that I would set it up with a SQLDataSource. this however would mean when I updated or added a row then the database would imedietly be updated. I need a way of storing an off line represention of the data and only applying the changes if the user confirms the preview of the data on the next page. I have tried using a DataTable but I get told it does not implement IDataSource. I also need to GridView to handle a sitation where there is no data and we only need to add rows (in the case of adding a quiz). Has anyone come across this problem before? Cheers Steve

    "Gödel proved that any formal system that defines the primitive recursive functions must be either incomplete or inconsistent. In particular one could not prove from within the system that the system itself was consistent even though the question could be formulated within the system."

    ASP.NET question database performance help

  • Regex to fix img tags
    S Stephen Adam

    Thanks for that it worked like a charm :)

    "Gödel proved that any formal system that defines the primitive recursive functions must be either incomplete or inconsistent. In particular one could not prove from within the system that the system itself was consistent even though the question could be formulated within the system."

    C# regex html help question

  • Regex to fix img tags
    S Stephen Adam

    Hi there, I'm writing an XHTML site and i'm using FreeTextBox to do it, unfortunately is has a nasty habbit of breaking XHTML rules with upper case tags and removing closing slashes from image tags. Now i've written a function which fixes allot of HTML errors which it (or the user) may create. The functionalitu i'm missing is a regex which will turn foo into foo Can anyone supply a regex replace pattern which will do this? This is my function so far in case anyone else finds it useful. public static string MakeHTMLValid(string strInput) { strInput = Regex.Replace(strInput, "

    ", "

    "); strInput = Regex.Replace(strInput, "

    ", "

    "); strInput = Regex.Replace(strInput, "", ""); strInput = Regex.Replace(strInput, "", ""); strInput = Regex.Replace(strInput, "", ""); strInput = Regex.Replace(strInput, "", ""); strInput = Regex.Replace(strInput, "

    ", "

    "); strInput = Regex.Replace(strInput, "

    ", ""); strInput = Regex.Replace(strInput, "", ""); strInput = Regex.Replace(strInput, "

    ", "

    "); strInput = Regex.Replace(strInput, "

    ", "

    "); strInput = Regex.Replace(strInput, "", ""); strInput = Regex.Replace(strInput, "
    ", "
    "); strInput = Regex.Replace(strInput, "
    ", "
    "); strInput = Regex.Replace(strInput, "
    ", "
    "); strInput = Regex.Replace(strInput, "
    ", "
    "); strInput = Regex.Replace(strInput, "class=normalText", "class=\"normalText\"", RegexOptions.IgnoreCase); strInput = Regex.Replace(strInput, "", ""); strInput = Regex.Replace(strInput, "


    ", "


    ",RegexOptions.IgnoreCase);

    C# regex html help question

  • select statement in sqlserver 2000
    S Stephen Adam

    Surely something like this is what you're after... sqlConn = new SqlConnection(sqlConnString); strCommandString = "SELECT Count(*) FROM table WHERE username = "+textbox1.text; sqlCmd = new SqlCommand(strCommandString); sqlConn.Open(); intCount = sqlCmd.ExecuteScalar(); sqlConn.Close(); int intCount; if (intCount > 0) responser.redirect(“loginsuccess.aspx”) else response.write(“invalid login.aspx”) Why are you using a data adapter? That is for use with DataSets. I think you wanted a datareader but the above code is a nicer and more efficient way of doing it. Execute Scaler whill get the value from the top row of returned results. Which in you case with the Count(*) command will only be one anyway. Hope this Helps :) PS - might I suggest you also take the users password ;) "Gödel proved that any formal system that defines the primitive recursive functions must be either incomplete or inconsistent. In particular one could not prove from within the system that the system itself was consistent even though the question could be formulated within the system."

    ASP.NET database sysadmin help

  • DataSet.WriteXml Problem With Nested Elements Of Same Name
    S Stephen Adam

    Hi there, I've got a problem with the DataSet.WriteXml method. I has an xml document which describes regions down to any level so for instance we might have something like this. > My problem is when I use the DataSet.WriteXml the elements are named based on the table names, now this isnt such a huge problem because I can just give them aliases like so... myDataSet.Tables["World"].TableName = "region"; myDataSet.Tables["Regions"].TableName = "region"; myDataSet.Tables["Countries"].TableName = "region"; But now I get a complaint from the dataset that I cant have two tables of the same name, how can I tell the WriteXML method or the dataset what to name the element tags? My only hack that i've thought of so far is this... myDataSet.Tables["World"].TableName = "region"; myDataSet.Tables["Regions"].TableName = "rEgion"; myDataSet.Tables["Countries"].TableName = "reGion"; and then to get rid of the element upper case with a regex as it comes out of the XmlTextWriter. How nasty is that? Tricking it using the same name in a different case. There must be a better way and microsoft cant have been so sort sighted. Cant they?? Nested elements of the same type, its not that crazy ass is it? Cheers for having a look! Steve protected void GetDealerInformation() { mySqlConnection.Open(); myDataSet.Clear(); mySqlDataAdapter = new SqlDataAdapter("SELECT * FROM tblWorld; SELECT * FROM tblRegions; SELECT * FROM tblCountries; SELECT * FROM tblDealers", mySqlConnection); mySqlConnection.Close(); mySqlDataAdapter.TableMappings.Add("Table", "World"); mySqlDataAdapter.TableMappings.Add("Table1", "Regions"); mySqlDataAdapter.TableMappings.Add("Table2", "Countries"); mySqlDataAdapter.TableMappings.Add("Table3", "Dealers"); mySqlDataAdapter.Fill(myDataSet); } protected void UpdateXMLFile () { GetDealerInformation(); string strPath = Request.PhysicalApplicationPath + @"Flash\locator13.xml"; XmlTextWriter myXmlTextWriter = new XmlTextWriter(strPath, Encoding.UTF8); myXmlTextWriter.Formatting = System.Xml.Formatting.Indented; DataRelation myDataRelation; DataColumn myParentCol; DataColumn myChildCol; myParentCol = myDataSet.Ta

    ASP.NET question adobe regex xml help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups