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
R

Ryno Burger

@Ryno Burger
About
Posts
32
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • fastest method
    R Ryno Burger

    +1 To BULK copy and format files.

    C# database career

  • Cancer
    R Ryno Burger

    Sorry to hear that. All of the best for you and your family.

    The Lounge com help

  • Request is not available in this context
    R Ryno Burger

    Hi guys I have a function called SendEmail which runs within a thread. This function simply send an email to the user. However, I made a "Please Wait..." page while the email gets send in the background the user see the "Please Wait..." page. public void SendEmail() { StringBuilder messageText = new StringBuilder(); messageText.AppendLine(string.Format("Name: {0} {1}", txtName.Text.Trim().ToString(), txtSurname.Text.Trim().ToString())); messageText.AppendLine(string.Format("Contact Number: {0}", txtContactNumber.Text.Trim().ToString())); messageText.AppendLine(string.Format("Email Address: {0}", txtEmail.Text.Trim().ToString())); messageText.AppendLine(string.Format("Comments: {0}\n\n", txtComments.Text.Trim().ToString())); messageText.AppendLine(string.Format("Quote Reference Nr: {0}", Request.QueryString["quoteNr"].ToString())); // Breaks here with error: Request is not available in this context // Send the email to the user } I call the SendEmail() function using the following lines of code: Guid id = Guid.NewGuid(); ThreadStart ts = new ThreadStart(SendEmail); Thread th = new Thread(ts); th.Start(); Response.Redirect(string.Format("PleaseWait.aspx?ID={0}&type={1}", id, "email")); Is it true that you can't access Request data within a thread, if not, how do I then get access to Request.QueryString data?

    ASP.NET question help

  • Request is not available in this context
    R Ryno Burger

    What do you mean? I left some code out for simplicity and readability reasons... May I ask, why do you reply if you don't want to offer help in the first place? Isn't that like... well... wasting your own valuable time? :wtf:

    C# question help

  • Request is not available in this context
    R Ryno Burger

    Hi guys I have a function called SendEmail which runs within a thread. This function simply send an email to the user. However, I made a "Please Wait..." page while the email gets send in the background the user see the "Please Wait..." page. public void SendEmail() { StringBuilder messageText = new StringBuilder(); messageText.AppendLine(string.Format("Name: {0} {1}", txtName.Text.Trim().ToString(), txtSurname.Text.Trim().ToString())); messageText.AppendLine(string.Format("Contact Number: {0}", txtContactNumber.Text.Trim().ToString())); messageText.AppendLine(string.Format("Email Address: {0}", txtEmail.Text.Trim().ToString())); messageText.AppendLine(string.Format("Comments: {0}\n\n", txtComments.Text.Trim().ToString())); messageText.AppendLine(string.Format("Quote Reference Nr: {0}", Request.QueryString["quoteNr"].ToString())); // Breaks here with error: Request is not available in this context // Send the email to the user } I call the SendEmail() function using the following lines of code: Guid id = Guid.NewGuid(); ThreadStart ts = new ThreadStart(SendEmail); Thread th = new Thread(ts); th.Start(); Response.Redirect(string.Format("PleaseWait.aspx?ID={0}&type={1}", id, "email")); Is it true that you can't access Request data within a thread, if not, how do I then get access to Request.QueryString data?

    C# question help

  • floating values issue
    R Ryno Burger

    Great stuff!! Thanks to both of you that replied. It works perfectly!!! :-D

    C# help question

  • floating values issue
    R Ryno Burger

    Hi, I havn't dealt much with floating numbers / calculation since recently. Let me explain my issue: I have the following 3 values declared: float overallTotalAmps = 0; int voltage = 230; int overTotalWatt = 126; on which I do the following calcluation: overallTotalAmps = float.Parse((overallTotalWatt / voltage).ToString()); The value of overallTotalAmps always returns 0.00 which should be 0.55 (126 / 230). Am I using the incorect data type here or perhaps if someone could just point out to me what it is I'm doing wrong here? :wtf: Thanks. R

    C# help question

  • Error - 182 -The left-hand side of an assignment must be a variable, property or indexer
    R Ryno Burger

    Hi Luc Thank you very much for your reply. Your solution made my error very clear and I get what I did wrong now. Thanks once again.

    C# help question

  • Error - 182 -The left-hand side of an assignment must be a variable, property or indexer
    R Ryno Burger

    Hi, I'm trying to unbox a value stored in ViewState using the code below: I can't seem to figure out what I'm doing wrong, can someone please perhaps point out what I'm doing wrong or perhaps an alternative? :wtf: (Int32)ViewState["totalLightsWatt"] = ((Int32)ViewState["totalLightsWatt"]) + (Int32.Parse(txtLightsQty.Text.Trim().ToString()) * Int32.Parse(cboLightsItems.SelectedValue.ToString())); Thanks. R

    C# help question

  • Deleting words from string
    R Ryno Burger

    I was thinking of Regex but wasn't sure. Thanks for that Kain!

    C# question

  • Being more generic
    R Ryno Burger

    Hi guys I wanna know how I could make the following function more generic and stop writing tedious code... My current example function: public SqlCommand SetupCommand() { SqlCommand cmd = new SqlCommand(); cmd.CommandText = "SELECT * FROM Test"; cmd.CommandTimeout = 180; return cmd; } The above snippet of code will return a SqlCommand object. However there is cases where I would like this very same method but this time around returning a OleDbCommand object. Is there a way to make this method more generic to be able to return any Command types e.g SqlCommand, OleDbCommand without having to re-write code all the time. I guess I'm searching for something similar to IDataReader that can return either SqlDataReader or OleDbDataReader. Thanks in advance. R.

    C# algorithms tutorial

  • MS Access 2003 and Triggers
    R Ryno Burger

    Hey guys Not sure if this is the appropriate forum but let me give it a go anyways. I’m trying to simulate triggers in MS Access 2003 from a .NET platform using C#. Is there anybody out there that perhaps faced the same challenge and if so can you please give me some guideline where to start. Any background, information of guidelines will be highly appreciated. Thanks. R

    Database csharp

  • Deleting words from string
    R Ryno Burger

    Is there a neater more professional way to re-write the code below? public string StripString(string statementString) { string alteredStatement = string.Empty; string keyword1 = "[dbo]."; string keyword2 = "["; string keyword3 = "]"; string remover = ""; string tmpStr1 = statementString.Replace(keyword1, remover); string tmpStr2 = tmpStr1.Replace(keyword2, remover); alteredStatement = tmpStr2.Replace(keyword3, remover); return alteredStatement; }

    C# question

  • Deleting words from string
    R Ryno Burger

    Nevermind I got it now, I'm just being stupid today... Thanks again guys!

    C# question

  • Deleting words from string
    R Ryno Burger

    But what if you were to remove a word like '{test}' including the braces?

    C# question

  • Deleting words from string
    R Ryno Burger

    Thanks to both of you that replied!! R

    C# question

  • Deleting words from string
    R Ryno Burger

    Hi guys How can I delete all occurrences of the word 'test' from a string I.e. String Before: This is a test to delete all occurrences of the word test String After: This is a to delete all occurrences of the word Please give me some guidelines here. Thanks R

    C# question

  • Upload and download measurement
    R Ryno Burger

    Hi guys Is there any way to measure the download and upload capabilities beforehand when sending and receiving files via TCP transmission based on the file size of the file being sent or received? Thanks BS

    C# question

  • Passing a List object to an xslt file
    R Ryno Burger

    Hi guys, If possible do any of you know how I can pass a List object to my xslt which will form part of my SQL query? This is what I'm tryin to achevive: First of all I will have a class being serialized and then deserialized using XML serialized in the case Client.cs. In the class I have a List property which will return a list of Client names: public List ClientNames Now in the next step I have an xslt that will transform my deserialized class and which will use the class properties as parameters to my SQL query. The code within the xsl are as follows: SELECT * FROM Client WHERE Client.ClientFirstName IN ('Test', 'Ben', 'Tom') Now what I'm trying to achieve is to pass the List object to my SQL IN clause using xslt... is that possible? Any help will be greatly appreciated. R

    XML / XSL xml database help question

  • Run a win32 app remotely?
    R Ryno Burger

    Hi guys, The following question I have is not directly a problem I’m having but rather a solution that I’m looking for. I have a win32 application written in .NET 2.0, basically a forms over data applications sending data back and forth to a SQL Server 2005 database. Now, our clients do not want to remote desktop to the server where the application and SQL server resides on, but rather be able to have user have like a client sitting on their local machines accessing the .exe application remotely. I don’t know if that is possible in the first place, so basically I’m looking for a solution where my users will be able to run the win32 application remotely without having to be on the physical server i.e. remote desktop to it. Has anybody out here faced a similar challenge before? I hope I make sense and hope to get your feedback soon. Thanks. R

    .NET (Core and Framework) database question csharp sql-server sysadmin
  • Login

  • Don't have an account? Register

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