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
C

CodyGen

@CodyGen
About
Posts
23
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Button click event asp.net 2.0
    C CodyGen

    you can try putting this under Button_Click event Response.Write("javascript:alert('5 items');");

    ASP.NET help csharp javascript asp-net

  • Information getting shared.
    C CodyGen

    Thanks for all of your reply. This doesn't happen all the time. So I am also thinking about concurrency problem. Here is the code. I used MyGeneration Doodads.

    = Convert.ToInt32(Right(vwhhm.NameID.Trim(), 2)); name.MoveNext(); } Array.Sort(intsuffix); string strsuffix = (intsuffix[name.RowCount - 1] + 1).ToString(); if(strsuffix.Trim().Length<2) { strsuffix = "0" +strsuffix; } return _NameID + strsuffix; } else { return _NameID + "01"; } } private sub ProcNames() { nameid = Session["NAMEID"].ToString(); if(UpdateNames(nameid, GenerateNewID(Session["NAMEID"].ToString()), txtFname.Text, txtLname.Text)) { Response.Write("Saved Successfully."); } } private Boolean UpdateNames(string _NameID, string NewID, string FirstName, string LastName) { TransactionMgr tx = TransactionMgr.ThreadTransactionMgr(); try { NameLists namelist = new NameLists(); nameList.AddNew(); namelist.NameID = _NameID.ToUpper(); namelist.NewID = NewID.ToUpper(); namelist.FName = FirstName.ToUpper(); namelist.LName = LastName.ToUpper(); tx.BeginTransaction(); namelist.Save(); tx.CommitTransaction(); return true; } catch(Exception ex) { tx.RollbackTransaction(); TransactionMgr.ThreadTransactionMgrReset(); return false; } }
    The flow is generate a new name by putting a number suffix at the end of the original name. If there existing name, it would increment the number. So "name" will be "name01","name02" etc... I also use "private static string ". Is that the best way to declare a variable or just have it as pri

    ASP.NET help question

  • Information getting shared.
    C CodyGen

    Hello to all, Is there anyone out there can shed a light why the information is getting shared between two or more users when they are signed on simultaneously? The problem is this, I created a web application where a user can sign on. I used session variables not cookies. When another user signs on to this web application and somehow any of the user save information they typed, it appears that the information getting saved is crossed over to the other user. It looks like they are sharing the same session. I am sorry that is the clearest way I could explain it. Thanks! :-)

    ASP.NET help question

  • Meta Data or Tag on TIF frames
    C CodyGen

    Hello to all, Is there a way to add a meta data or tag to each frame of the TIF image? I have a project that gets a certain frame from a TIF file. The frame will be saved or appended to another TIF file which already has an existing frame in it. My problem is that I need to save the name of the file from which the frame originated and what page. For example, frame 0 is from file: TIF1.TIF and frame 1 is from TIF4.TIF and frame 2 is from TIF2.TIF. Thanks in advance.

    C# help tutorial question

  • Please Help !
    C CodyGen

    You can try checking this one: http://www.codeproject.com/useritems/FarsiLibrary.asp?msg=1512234[^]

    C# csharp question help

  • String to GUID [modified]
    C CodyGen

    Hello fracalifa, Try this snippet: string st = Convert.ToString(Guid.NewGuid()); Guid gid = new Guid(st);

    C# question

  • Find Button
    C CodyGen

    You might try checking this out: http://www.dotnetjunkies.com/Tutorial/195E323C-78F3-4884-A5AA-3A1081AC3B35.dcik[^]

    C# help question

  • creating and handling serial numbers
    C CodyGen

    Try checking GUID. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemguidclasstopic.asp[^] or http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=335[^]

    C# question

  • How to copy a picture???
    C CodyGen

    Before saving a file to a particular folder, it is a good practice that you check the folder's existence. Review the following code: string MyFolderDir = "C:\\MyFolder\\"; if(!Directory.Exists(MyFolderDir )) // if your folder does not exist { Directory.Create(MyFolderDir); // create the folder on the specified directory } In the "File of Type" dropdown, you just need to specify the text that would appear and the filter. You can separate them using the "|" character. Like this: openFile.Filter = "Image File (*.gif;*.jpg;*.bmp)|*.gif;*.jpg;*.bmp"; Microsoft KB and other sites such as this have very good articles about File operations. Try exploring. Enjoy! :-D -- modified at 9:45 Saturday 21st January, 2006

    C# design debugging help tutorial question

  • display a file to the browser using stream
    C CodyGen

    I guess I am out of luck since I am trying to display a stream of image and a pdf. Oh well, thanks. :-)

    C# csharp visual-studio question

  • display a file to the browser using stream
    C CodyGen

    Hello, I'm using the browser control of vs.net 2005 and what I am trying to do is to display a file like an image via stream and not using the physical file path. Can this be done? I have tried using the DocumentStream property but only displays the file in garbled text. Many thanks. :confused:

    C# csharp visual-studio question

  • how to take integer input in c#
    C CodyGen

    if you are trying to accept only numeric values in your text box, you can use the e.Handle = true of KeyPressEventArgs to cancel the keypress event. You can try the code below. string strnum = "0123456789"; if (strnum.IndexOf(e.KeyChar.ToString())<0) { e.Handled = true; }

    C# csharp tutorial

  • How to copy a picture???
    C CodyGen

    OpenFileDialog openFile = new OpenFileDialog(); openFile.Filter = "Image files|*.tif;*.tiff;*.bmp|All files (*.*)|*.*"; if (openFile.ShowDialog() == DialogResult.OK) { File.Copy(openFile.FileName, Application.StartupPath +"\\coped.gif"); } -- modified at 15:45 Friday 20th January, 2006

    C# design debugging help tutorial question

  • dataGrid & first row selection
    C CodyGen

    try posting your code so we can determine what is going on. :)

    C# question

  • New in C# and SQL Server (Express Editions)
    C CodyGen

    Don't loose hope. Internet is a jungle. You just need a patient finding anything you need. Try google. Also try this: http://www.c-sharpcorner.com/Code/2004/Oct/DataSourceControls.asp[^]

    C# tutorial learning csharp css database

  • Remove the back slash in a TextBox
    C CodyGen

    you can use the Replace method of the string. newstring = strbackslash.Replace("\","")

    Visual Basic csharp

  • deleting in use files
    C CodyGen

    I don't know for sure if there is a way using c#. I encounter same problem with deleting files that are currently in use. You can try using the force delete of vbscript if that is applicable. It works for me.

    C# question

  • how to auto refresh listbox values
    C CodyGen

    try clearing the listbox before putting your items again. Drop a Timer Control and set the Interval to 2000(2 seconds) and set it to Enable=true: private void timer1_Tick(object sender, EventArgs e) { populatelist(); } private void populatelist() { /*assume that your list of proccesses are coming from an arraylist arlist*/ listBox1.Items.Clear(); for (int i = 0; i < 5; i++) { listBox1.Items.Add(arlist[i].ToString()); } }

    C# question help tutorial announcement

  • Email issue
    C CodyGen

    This could be an authentication issue. Try providing more details to the account you want to use to send the email. I have found this from Microsoft and it helped me. You may want to try it too: try { string smtpServer = "mail.mystmpserver.com"; //your smtp server here userName = "myaccount@mystmpserver.com; //your account info here password = "mypassword"; //your password int cdoBasic = 1; int cdoSendUsingPort = 2; MailMessage mail = new MailMessage(); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserver", smtpServer); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25) ; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusing", cdoSendUsingPort) ; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", cdoBasic); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", userName); mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", password); mail.To = "emailaddress@server.com" ; // if you want to send it to multiple email address separate them using semicolon mail.From = "emailaddress2@server.com" ; mail.Subject = "Subject here"; mail.Attachments.Add("file here"); mail.BodyFormat = MailFormat.Html; mail.Body = "This is a bold text in the body of the mail." SmtpMail.SmtpServer=smtpServer; SmtpMail.Send( mail ); Label1.Text="Message Sending successful"; } catch(Exception ex) { Label1.Text="Message Sending failed! Error: " + strerror ; }

    C# help html

  • doubt in Infragistics.Win.UltraWinTree
    C CodyGen

    Infragistics is one of the great components for .net. I've used WinGrid and other controls but I haven't tried using WinTree. Try visiting Infragistics Knowledge Base for WinTree or try these links from them: http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=969[^] http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=1003[^]

    C# csharp data-structures help tutorial career
  • Login

  • Don't have an account? Register

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