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
L

lucjon

@lucjon
About
Posts
19
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Hiding menubar, statusbar and toolbar in javascript
    L lucjon

    There is a problem if you use window.open() , because most pop-up blockers block window.open() , whether it is legit or not.

    ASP.NET javascript question

  • Need code for display the text with Image
    L lucjon

    Here is the old code in C#:

    protected void button1_Click(Object sender, EventArgs e) {
    Response.Redirect("ThisPage.aspx?showtext=text&imageloc=loc");
    }
    protected void label1_PreRender(object sender, EventArgs e) {
    if (Request.QueryString("showtext")!=null||Request.QueryString("showtext")!="") {
    label1.Text = request.QueryString("showtext");
    }
    }
    protected void pictureBox1_PreRender(object sender, EventArgs e) {
    if (Request.QueryString("imageloc")!=null||Request.QueryString("showtext")!="") {
    pictureBox1.ImageLocation = Request.QueryString("imageloc");
    }
    }

    ASP.NET csharp asp-net

  • Need code for display the text with Image
    L lucjon

    Sorry :-O You could try this:

    public string GetImagePath()
    {
    switch (ddlsunsign.Text) {
    case Aries:
    return "../../DesignTier/SignImages/ariesstat.jpg";
    case Aquarius:
    return "../../DesignTier/SignImages/aquariusstat.jpg";
    //case Libra, Pisces,...
    case default:
    return null;
    }
    }
    public string GetStat()
    {
    switch (ddlsunsign.text) {
    case Aries:
    return //database code
    //etc
    case default:
    return null;
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
    if (GetImagePath()!=null&&GetStat()!=null) {
    Response.Redirect("ThisPage.aspx?imageloc=\"" + GetImagePath + "\"&text=\"" + GetStat() + "\"");
    }
    }
    protected void descriptionLabel_PreRender(object sender, EventArgs e)
    {
    if (Request.QueryString("text")!=null) {
    descriptionLabel.Text = Request.QueryString;
    }
    else {
    descriptionLabel.Text = "Error";
    }
    }
    protected void signImage_PreRender(object sender, EventArgs e)
    {
    if (Request.QueryString("imageloc")!=null) {
    signImage.ImageLocation = Request.QueryString("imageloc");
    else {
    signImage.ImageLocation = //friendly error message;
    }
    }

    ASP.NET csharp asp-net

  • operating system accounts(to login) in vb.net
    L lucjon

    I think it is showing the real accounts, with the `hidden` accounts, such as the help and support account, if you have VMWare installed, __vmware_user__ and other things. You could try:

    For Each oresult In ocollection
    Dim oname As String = oresult("Name").ToString
    If Not oname.StartsWith("SUPPORT") Then
    If oname <> "__vmware_user__" Then
    If oname <> "ASPNET" Then
    If oname <> "HelpAssistant" Then
    textBox1.Text = oname & " "
    End If
    End If
    End If
    End If

    I don't know if this'll work very well.

    Visual Basic csharp database

  • Detect system shutdown
    L lucjon

    I searched the web and you can use the Microsoft.Win32.SessionEnded event, as described here. Also, the Shutdown event in ApplicationEvents.vb or similar (I don't know about C#/++ or J#) refers to the Shutdown of your application, not the system.

    C# windows-admin csharp dotnet sysadmin help

  • Emulator
    L lucjon

    There are various PS2 emulators, but using the ROM's required is illegal due to copyright law. This also applies to all recent games consoles. If you are unsure, ask the manufacturer.

    System Admin question

  • How to download an executeable file, if only zip files can be downloaded
    L lucjon

    I have written a program that should work. Download files using this instead of your web browser. It is in a ZIP here (http://gargunnockp56.somee.com/)

    IT & Infrastructure tutorial

  • Need code for display the text with Image
    L lucjon

    Hi, I'm going to assume that you are passing the text to the age through the page parameter "showtext" (page.aspx?showtext="what to show"). This first example has a button that shows the text:

    Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    Response.Redirect("ThisPage.aspx?showtext=text")
    End Sub

    Sub Label1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.PreRender
    If Request.QueryString("showtext") <> Nothing Or Request.QueryString("showtext") <> "" Then
    Label1.Text = request.QueryString("showtext")
    End If
    End Sub

    To show the Image, I assume that you are passing the image location through the parameter "imageloc". It also has the button:

    Sub Button1_Click(ByVal sender As Object, byVal e As System.EventArgs) Handles Button1.Click
    Response.Redirect("ThisPage.aspx?imageloc=image1.png")
    End Sub

    Sub PictureBox1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.PreRender
    If Request.QueryString("imageloc") <> Nothing Or Request.QueryString("imageloc") Then
    PictureBox1.ImageLocation = Request.QueryString("imageloc")
    End If
    End Sub

    ASP.NET csharp asp-net

  • Input Textbox Colour
    L lucjon

    Select the input fields and set the BackColor property to White. This will mean no matter what, your field background should be white.

    ASP.NET question

  • Downloading a cab file without any chenge in content or size..
    L lucjon

    Hi, I don't know if you've tried this, but you could try:

    public void SendFile(String myFilePath) {
    Response.TransmitFile(myFilePath)
    }

    For more information on Response.TransmitFile then go to: http://msdn.microsoft.com/msdnmag/issues/06/09/webdownloads/default.aspx

    ASP.NET csharp asp-net help tutorial question

  • Critical VS2005 Error
    L lucjon

    Hi, 2 errors have suddenly appeared in VS2005 (VB): 1. Whenever I switch to code view, it crashes and comes up with an error reporting dialog. This happens whether I press F12 (custom key), I click Main.vb or double-click a control. 2. When I open Choose Toolbox Items, then COM Components, then Browse... to access the Mozilla ActiveX control which didn't register properly, it hangs. Any help would be very much appreciated. By the way, none of this happens in C# Studio.

    Visual Studio com help csharp

  • VS 2003 in vista Find locking up IDE
    L lucjon

    I think moving to VS2005 may be your only option. Unless you have an XP disc and a spare partition/hard disk. If you move to VS2005, download SP1 for Vista: Download details page Also, you should contact the company that provides your 3rd party stuff, see if there are free or reduced cost options for upgrading. Another option, though it's a bit fiddly, is to install both versions, and use VS2005 when the 3rd party software isn't needed.

    Visual Studio visual-studio help question

  • exe in the system tray
    L lucjon

    You could tell the installer to execute your program after the installation has finished.

    Visual Basic csharp sysadmin question workspace

  • ASP.NET Ajax v1.0
    L lucjon

    Hi, PC Plus Magazine (recent issue, Code it section) states that ASP.NET Ajax (Atlas) 1.0 uses the Microsoft Permissive license. I'm not very good at legal stuff, but from what I read here, I think it can be used commercially.

    ASP.NET csharp asp-net help question

  • how to get value in the textbox
    L lucjon

    Hi, AFAIK, there is no OnFocus event in the ASP.NET textbox. If txt2 is the editable one, and you want to have txt3 updated when txt2 is changed, you could do:

    Protected Sub txt2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt2.TextChanged
    If Txt1 <> "" And Txt2 <> "" Then
    Txt3.Text = txt1.Text & txt2.Text
    Else
    'Error handling code
    End If
    End Sub

    ASP.NET javascript help tutorial

  • How to insert text at cursor position in a TextBox
    L lucjon

    Hi, I am looking for a way to insert text into a TextBox at the current position, as I am trying to make an site to create web pages with Google stuff (like Maps, Search). I know that you can do

    TextBox1.Text.Insert(1, New IO.StreamReader("Maps.txt").ReadToEnd)

    , but I need to replace 1 with the current cursor position in the TextBox. It is being written in VB, but I can do a little bit of C#. Thanks

    ASP.NET csharp tutorial

  • Sudden form creation error after no code change
    L lucjon

    Thanks, I'll just try that now.

    Visual Basic csharp visual-studio data-structures debugging

  • Sudden form creation error after no code change
    L lucjon

    Sorry I did not mention this, but my RibbonBar has disappeared. Kind of. When I click on its area, it shows up in the properties window, but it is just blankon the form. Sorry.

    Visual Basic csharp visual-studio data-structures debugging

  • Sudden form creation error after no code change
    L lucjon

    I'm quite new to programming and VB.NET, so Idon't know if this is really obvious. I ran my Rich Text Editor (using Telerik R.A.D. RibbonBar and your own [ExtendedRichTextBox](http://<a href=)), and I got the following error: An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object. Stack trace: at WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 at WindowsApplication1.My.MyProject.MyForms.get_frmMain() at WindowsApplication1.My.MyApplication.OnCreateMainForm() in C:\Documents and Settings\lucas\My Documents\Visual Studio 2005\Projects\LucasToolsEditor\My Project\Application.Designer.vb:line 35 at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at WindowsApplication1.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Thanks.

    Visual Basic csharp visual-studio data-structures debugging
  • Login

  • Don't have an account? Register

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