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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
S

Sketchy Steve

@Sketchy Steve
About
Posts
5
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Valid XHTML - Whats The Best Method
    S Sketchy Steve

    Hi there, I've done some looking on the web and have found a couple of solutions, the first http://www.liquid-internet.co.uk/content/dynamic/pages/series1article1.aspx looked very clean and nice but it does not work with webcontrols. I've seen an article here but is suggests going through the entire page and replacing each 'incorrect' attribute. Whats everybodies prefered method, I've only got visual studio 2003 and dont know if I can use ASP.NEt version 2 or if there are other better options. Thanks Steve

    ASP.NET csharp asp-net visual-studio announcement

  • Email Template Editor in Asp.net Using VB
    S Sketchy Steve

    If you really have no idea how to go about it then maybe you should start of with a smaller project. There are numerous ways to go about designing an application in .net, many are covered in tutorials on the web. Why not read some of these, have a bash at the problem yourself and then post here with any specific questions or problems. Ther eis much source code here are code project, have a read through it and get some idea's :)

    ASP.NET csharp asp-net help question

  • Uploading file using Browse Btn & Downloading the attached file
    S Sketchy Steve

    Ere you go, This function take an image and an HtmlInputFile, it uploads the file, if it has the correct mime type - in the case an image type - it then appends the session state to the file name (to avoid overwriting any files of the same name) next it gets the physical uplication path and tells the function which sub dir to upload the file to. you want to use an tag on front end and refer to it as system.web.ui.htmlcontrols.htmlinputfile on back end. Hope this helps :) protected void UploadImage(ref Image imgUploadedImage, ref HtmlInputFile flInputImage) { if (flInputImage.PostedFile != null) { string PicType = flInputImage.PostedFile.ContentType.ToString(); if (PicType == "image/jpeg" || PicType == "image/gif" || PicType == "image/pjpeg" || PicType == "image/bmp") { try { string PicName = flInputImage.PostedFile.FileName; string NewPicName = (string)Session.SessionID + "_" + PicName.Substring(PicName.LastIndexOf(@"\")+1); string UploadPath = Request.PhysicalApplicationPath + @"\CMS\Uploads\"; flInputImage.PostedFile.SaveAs(UploadPath + NewPicName); imgUploadedImage.AlternateText = "Uploaded picture..."; imgUploadedImage.ImageUrl = "../CMS/Uploads/" + NewPicName; imgUploadedImage.Visible = true; } catch (Exception exc) { lblTest.CssClass = "Error"; lblTest.Text = exc.ToString(); } } else { lblTest.CssClass = "Error"; lblTest.Text = "File format not supported!"; } } }

    ASP.NET question

  • Dynamic Creation of aweb page at runtime
    S Sketchy Steve

    The way this is normally done is by creating an ASPX (equiv to HTML) page and placing webcontrols onto it like so... Image Alt : Image : < asp:image id="imgImage" runat="server"/> Then populating them in code behind using the page_load event (which is fired when the page is loaded) check if this is the first time the page has been loaded (using IsPostBack), if it is then fill out the fields using a database query like the one shown below - if not dont bother as asp.nets view state will make most info persistant. It would help if you were more specific, what i've put down here may well confuse you more than it will help but I hope it will point you in the right direction. Sounds like you could do with reading a few basic tutorials - try them (theres some good ones on 4 guys frm rolla, this one will give you all the basics too http://www.w3schools.com/aspnet/default.asp[^], there also some right here on code project ;) protected void Page_Load(Object sender, EventArgs e) { CheckUserLoggedIn(); mySQLConnection.ConnectionString = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]; mySQLCommand.Connection = mySQLConnection; if (!IsPostBack){ mySQLCommand.CommandText = "SELECT * FROM tblKnowledgeBase WHERE [ID] ='"+ tbArticleID.Text +"'"; ; mySQLConnection.Open(); mySQLDataReader = mySQLCommand.ExecuteReader(); while (mySQLDataReader.Read()){ tbTitle.Text = mySQLDataReader.GetString(3); tbText.Text = mySQLDataReader.GetString(4); if (mySQLDataReader.GetString(5) != ""){ imgImage.ImageUrl = "Uploads/" + mySQLDataReader.GetString(5); } }// End If !PostBack

    ASP.NET database help

  • How To Include An ASPX Page In A Web Control
    S Sketchy Steve

    Hi there, What I want to create is a image uploader web control. It will consist of two buttons (one to upload one to clear an uploaded file), an image to show what file has been uploaded or an image of a question mark if none has been uploaded yet and a hidden field to store the address of the file once it has been uploaded. Now thats all easy enough (a composite control does nicely so far) but when you click on the upload button it gets a bit harder. At this point a popup will appear with a preview pane for the image and an ok button (to uploaded the image and writeback to the parent page) and a cancel button to close the window. Is this possible and has anyone done anything similar? From my searches so far I assume I will need to embed the popup (aspx) page as a resource in my project and then call that in my web control (as with any images used aswell). Is there any example code to call a page which has been embeded in a webcontrol floating about? If some one could give me a bit of sample code with directions just to show me how to create a control with one button with opens a popup embded in its dll that would be most appreciated. When its finished i'll chuck it on the site! Cheers Steve

    ASP.NET tutorial question learning
  • Login

  • Don't have an account? Register

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