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
J

janetb99

@janetb99
About
Posts
59
Topics
27
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • modalpopupextender with dynamic checkboxlist
    J janetb99

    For anyone else, - just wanted you to know that I figured out the bigger problem. Something must have corrupted the ajaxcontroltoolkit installation just enough. Once I re-referenced it, everything started working fine. Sorry for the trouble and thanks for your help.

    ASP.NET adobe help question learning

  • modalpopupextender with dynamic checkboxlist
    J janetb99

    I have a checkboxlist populated by a datasource having a textbox as a controlparameter. The checkboxlist is located within a modalpopup. When I click the button, the checkboxlist shows the list pertaining to the previous select. If I close and click the button to show the modalpopup, the second click shows the updated checkboxlist. I've tried everything I can think of and nothing seems to work. The latest attempt is to have a dummy button (arcArcPat) for the modalpopup. I click on btnPrePat to get the dynamic checkbox, but no modalpopup appears. Of course, when I click on btnArcPat, everything's great because I've clicked on the btnPrePat first. I tried taking away the display:none; and then I only get a flash on the screen, nothing that stays. Help?

    Protected Sub btnPrePat\_Click(sender As Object, e As EventArgs) Handles btnPrePat.Click 
        ds = New Data.DataSet 
        strSql = "SELECT TOP (100) PERCENT t.patID,  myType FROM blah, blah" 
        da = New Data.SqlClient.SqlDataAdapter(strSql, cn) 
        Try 
            da.Fill(ds, "patSearch1") 
            If ds.Tables("patSearch1").Rows.Count > 0 Then 
                cblPat.DataSource = ds.Tables("patSearch1") 
                cblPat.DataTextField = ds.Tables("pat").Columns("myType").ToString 
                cblPat.DataValueField = ds.Tables("pat").Columns("patID").ToString 
                cblPat.DataBind() 
            End If 
        Catch ex As Exception 
            Response.Write(ex.ToString) 
        End Try 
        mpePat.Show() 
    End Sub
    
    ASP.NET adobe help question learning

  • Referencing User Control Attributes in Page Code Behind
    J janetb99

    I found this, and I kinda get what they're saying, but I can't get it to work either. tip18843

    Protected MyCtl As Panel
    Private Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Init
    MyCtl = DirectCast(FindControl("pnlStage1"), Panel)
    End Sub
    Protected Sub btnStep2b_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnStep2b.Click
    MyCtl.BackColor = Drawing.Color.Azure
    End Sub

    ASP.NET graphics sysadmin help question

  • Referencing User Control Attributes in Page Code Behind
    J janetb99

    Thanks for the reply, Richard. Tried it, but no go. I still think it has something to do with those pesky Master pages. Again, the one I've been using without Master Pages works fine... Got the same error. Dim myCtrl As UserControl = CType(FindControl("ceSteps1"), UserControl) Dim myPnl As Panel = CType(myCtrl.FindControl("pnlStage1"), Panel) myPnl.BackColor = Drawing.Color.Azure

    ASP.NET graphics sysadmin help question

  • Referencing User Control Attributes in Page Code Behind
    J janetb99

    Sorry, that won't work for me - I need to do so from the child webpage. Let me try and be a little more precise, maybe that will help. I really think it's something to do with master/child since I was able to successfully reference one when not using the master.

    Master:
    <%@ Master Language="VB" CodeFile="SSLmaster.master.vb" Inherits="master" EnableTheming="true" %>
    <body>
    <form id="form1" runat="server" enableviewstate="true"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder>
    yahda, yahda, yahda...

    Child:
    <%@ Page Title="yahda" Theme="SSL" Language="VB" MasterPageFile="~/inc/SSLmaster.master" AutoEventWireup="false" CodeFile="zdetail1.aspx.vb" Inherits="calendar_zdetail1" %>
    <%@ Register Src="~/inc/ceSteps.ascx" TagName="ceSteps" TagPrefix="uc1" %>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    UserControl:
    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="ceSteps.ascx.vb" Inherits="inc_ceSteps" %>
    <asp:Panel runat="server" ID="Panel1" > Step 1 </asp:Panel>

    CodeBehind of Child:
    First Stab (successful on page without Master):
    Dim myPnl As Panel = CType(CType(FindControl("ceSteps"), UserControl).FindControl("pnlStage1"), Panel)
    myPnl.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

    Second Stab (and many more variations)
    Dim myConPH As ContentPlaceHolder
    myConPH = CType(FindControl("SSLmaster_ContentPlaceHolder1"), ContentPlaceHolder)
    Dim myPnl As Panel = CType(CType(myConPH.FindControl("ceSteps"), UserControl).FindControl("Panel1"), Panel)
    myPnl.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

    ASP.NET graphics sysadmin help question

  • Referencing User Control Attributes in Page Code Behind
    J janetb99

    Sorry, that won't work for me if I can't reference the control to change the style. Understand the problem now? Let me try and be a little more precise, maybe that will help. I really think it's something to do with master/child since I was able to successfully reference one when not using the master.

    Master:
    <%@ Master Language="VB" CodeFile="SSLmaster.master.vb" Inherits="master" EnableTheming="true" %>
    <body>
    <form id="form1" runat="server" enableviewstate="true"><asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder>
    yahda, yahda, yahda...

    Child:
    <%@ Page Title="yahda" Theme="SSL" Language="VB" MasterPageFile="~/inc/SSLmaster.master" AutoEventWireup="false" CodeFile="zdetail1.aspx.vb" Inherits="calendar_zdetail1" %>
    <%@ Register Src="~/inc/ceSteps.ascx" TagName="ceSteps" TagPrefix="uc1" %>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    UserControl:
    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="ceSteps.ascx.vb" Inherits="inc_ceSteps" %>
    <asp:Panel runat="server" ID="Panel1" > Step 1 </asp:Panel>

    CodeBehind of Child:
    First Stab (successful on page without Master):
    Dim myPnl As Panel = CType(CType(FindControl("ceSteps"), UserControl).FindControl("pnlStage1"), Panel)
    myPnl.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

    Second Stab (and many more variations)
    Dim myConPH As ContentPlaceHolder
    myConPH = CType(FindControl("SSLmaster_ContentPlaceHolder1"), ContentPlaceHolder)
    Dim myPnl As Panel = CType(CType(myConPH.FindControl("ceSteps"), UserControl).FindControl("pnlStage1"), Panel)
    myPnl.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

    ASP.NET graphics sysadmin help question

  • Referencing User Control Attributes in Page Code Behind
    J janetb99

    I also thought it might be because I was missing the reference through the master/content relationship, but that wasn't it:

    Dim myConPH As ContentPlaceHolder
    myConPH = CType(FindControl("SSLmaster_ContentPlaceHolder1"), ContentPlaceHolder)
    Dim myPnl As Panel = CType(CType(myConPH.FindControl("ceSteps"), UserControl).FindControl("pnlStage1"), Panel)

    ASP.NET graphics sysadmin help question

  • Referencing User Control Attributes in Page Code Behind
    J janetb99

    I kinda get what you're saying and I tried it, but it won't let me reference the class ceSteps as a namespace like I do when I import at the top of the page (say for my login code) and then reference an instance of a namespace. I've used the code below before in another app, honest, but it's not working and I'm stumped.

    Dim myPnl As Panel = CType(CType(FindControl("ceSteps"), UserControl).FindControl("pnlStage1"), Panel)
    myPnl.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

    ASP.NET graphics sysadmin help question

  • Referencing User Control Attributes in Page Code Behind
    J janetb99

    I'm trying to reference the attributes of a panel in a User Control in the code behind of a web page. I've tried about a dozen variations. Can't be this hard. Anybody got the correct syntax? Thanks!

    <%@ Register Src="~/inc/ceSteps.ascx" TagName="ceSteps" TagPrefix="uc1" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <uc1:ceSteps ID="ceSteps" runat="server" />

    Then in the page's code behind, here's where I get stuck.
    Dim myCtrl As UserControl = CType(FindControl("uc1"), UserControl)
    myCtrl.pnlStage1.BackColor = System.Drawing.ColorTranslator.FromHtml("#dfdfdf")

    yahda, yahda, yahda....

    ASP.NET graphics sysadmin help question

  • shortcut key for current date in textbox
    J janetb99

    Well, posh. Almost there. The textboxes are actually in a gridview, footer and edit rows. So, I tried this in the textbox on the footer row as a test: onClick="setNow(this);" and it didn't work. So I tried putting name="textBoxName" as well as id="textBoxName" on the control. Didn't work. Know of a way around this so that the javascript can get the correct argument? Thanks.

    ASP.NET csharp asp-net tutorial question

  • shortcut key for current date in textbox
    J janetb99

    NeverHeardOfMe - found it! This works: Thanks so much for pointing me in the right direction.

    ASP.NET csharp asp-net tutorial question

  • shortcut key for current date in textbox
    J janetb99

    Thanks, NeverHeardOfMe. Doesn't work for me to only use javascript and change my textboxes to non-asp.net textboxes. I'm going to have multiple date asp.net textboxes on the page, and within any of the textboxes, I need to be able to call the shortcut to render the current date, so if they could be asp.net textboxes, your code would work. But, I need the functionality of the asp.net textbox. I tried to get the text of the asp.net textbox to be a hyperlink, but it renders the text literally today. If I could get around that, it'd be wondermous. Any ideas?

    ASP.NET csharp asp-net tutorial question

  • shortcut key for current date in textbox
    J janetb99

    Interesting idea. Got an example anywhere? Might be a good idea.

    ASP.NET csharp asp-net tutorial question

  • shortcut key for current date in textbox
    J janetb99

    Thanks Yusef - looks like it might be putting me on the right track. Appreciate your time.

    ASP.NET csharp asp-net tutorial question

  • shortcut key for current date in textbox
    J janetb99

    Thanks, Yusef, I'll take a look. The url supplied was a "not found" - maybe a typo? Could you redo, please? Thanks!

    ASP.NET csharp asp-net tutorial question

  • shortcut key for current date in textbox
    J janetb99

    I've got multiple date fields on a form in asp.net. I've been asked if there's a way to have a shortcut key (e.g. Ctl+semicolon) to fill the field with the current date. But, I don't want the fields to default to the current date, because many times the fields are left empty. Anybody got an example of code without buying Beans or some other outside software? Thanks, JB

    ASP.NET csharp asp-net tutorial question

  • calling sql ssis package through asp.net
    J janetb99

    Vuyiswa Maseko, Thanks for the reply. Tried to follow these two articles: http://www.dotnetfunda.com/articles/article786-how-to-execute-ssis-packages-in-csharp-aspnet--part-i-.aspx\[^\] http://www.dotnetfunda.com/articles/article795-how-to-execute-ssis-packages-in-csharp-aspnet-part-ii-.aspx\[^\] And I'm still having problems. I went back using BMI and created the package. Executes fine. Went into VS2008, and ran the following code:

    Try
    Dim pkg As New Microsoft.SqlServer.Dts.Runtime.Package
    Dim app As New Microsoft.SqlServer.Dts.Runtime.Application
    'Dim sResultDts As DTSExecResult
    pkg = app.LoadPackage("F:\Program Files\Microsoft SQL Server\90\DTS\Packages\housingImport2\housingImport2\Package1.dtsx", Nothing)
    pkg.Execute()
    Catch ex As Exception
    Response.Write(ex.ToString)
    End Try

    I have no rows in my table and no error written to the screen. If I go into the SQL Mgmt Studio under Integrations Services, store packages, file system, housingImport2, housingImport2 and run package1.dtsx, I get 89 rows. Any help?

    ASP.NET sql-server database csharp asp-net sharepoint

  • calling sql ssis package through asp.net
    J janetb99

    Nope, that doesn't do it.

    ASP.NET sql-server database csharp asp-net sharepoint

  • calling sql ssis package through asp.net
    J janetb99

    I've successfully created an xls import (using the wizard) via SSMS and saved it in sql under msdb on the sql server. I'm able to see it and run it via the sql integration services under stored packages/msdb successfully. The import package locates and retrieves the xls file automatically (no variables - it's always saved and named the same) I'm trying (unsuccessfully) to run the package through asp.net via an sql stored procedure. I've been futzing with it a bit trying different things... nothing working yet, I keep getting at -1. Can anyone help me out? I've read the articles, but I'm a bit lost. The .net is: Dim cmd As New Data.SqlClient.SqlCommand("gme.dbo.sp_housingImport", cn) cmd.Connection.Open() myReturn = (cmd.ExecuteNonQuery) Response.Write("myReturn=" & myReturn.ToString) Stored procedure: DECLARE @ServerName NVARCHAR(100) DECLARE @cmd NVARCHAR(4000) DECLARE @jid UNIQUEIDENTIFIER DECLARE @jname NVARCHAR(128) DECLARE @jobName NVARCHAR(128) DECLARE @FileLocation as varchar(500) -- Create a unique job name SET @ServerName = CONVERT(sysname, SERVERPROPERTY(N'myServerName')) SET @jname = CAST(NEWID() AS CHAR(36)) SET @jobName = @jname SET @FileLocation = 'E:\\myfolder\excel.xls' --set the name and location of the ssis package to run. SET @cmd = '"F:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTExec.exe" ' SET @cmd = @cmd + '/DTS "\MSDB\housingImport" ' SET @cmd = @cmd + '/SERVER ' + @ServerName + ' ' SET @cmd = @cmd + '/CHECKPOINTING OFF ' -- Specify ssis variable value in the package that represents the location of the input file to load SET @cmd = @cmd + '/SET "\Package.Variables[User::varInputFile].Value";"' + @FileLocation + '" ' -- Create job EXEC msdb.dbo.sp_add_job @job_name = @jname, @enabled = 1, --@category_name = 'housingImport', --deletes the job when it is done, regardless of whether or not it was successful @delete_level = 3, @job_id = @jid OUTPUT --Add the job to the Sql Server instance EXEC msdb.dbo.sp_add_jobserver @job_id = @jid, @server_name = '(local)' --Add the step to the job that invokes the ssis package EXEC msdb.dbo.sp_add_jobstep @job_id = @jid, @step_name = 'Execute DTS', @subsystem = 'CMDEXEC', @command = @cmd -- Start job EXEC msdb.dbo.sp_start_job @job_id = @jid

    ASP.NET sql-server database csharp asp-net sharepoint

  • Gridview containing dependent dropdownlists errors on edit.
    J janetb99

    I have a dropdownlist2 in a gridview whose datasource and select control parameter is based on the selected value of dropdownlist1 in the same gridview. Everything works great for insert, but when I edit the row in the gridview and change the selected value in dropdownlist1, I get an error of "'dropdownlist2' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value" This kinda makes sense to me. At what stage (maybe drowdownlist1 selectedindexchanged?) do I tell dropdownlist2 that it needs to requery so I don't get the error. I can just tell it to select the 0 index by default here for dropdownlist2. An example would be lovely.

    ASP.NET database help tutorial question
  • Login

  • Don't have an account? Register

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