Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Professional DotNetNuke ASP.NET Portals ISBN: 0-7645-9563-6
This is the forum to discuss the Wrox book Professional DotNetNuke ASP.NET Portals by Shaun Walker, Patrick J. Santry, Joe Brinkman, Dan Caron, Scott McCulloch, Scott Willhite, Bruce Hopkins; ISBN: 9780764595639
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional DotNetNuke ASP.NET Portals ISBN: 0-7645-9563-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 11th, 2007, 06:37 AM
Registered User
Join Date: Dec 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Client Side Script not working in DNN


I'm trying to get some Client Side script working in my DNN module.

It works fine in a .aspx page but when I add it to my .ascx module it stops working.

Basically it populates a dropdownlist from a SQL dB.

Thnx for looking

<%@ Import Namespace="System.Data.SQLClient" %>
<%@ Import Namespace="System.Data" %>

<script language="VB" runat="server">

Sub Page_Load(Source As Object, E As EventArgs)
       If Not Page.IsPostBack Then
            Dim SQLConn As SQLConnection
            Dim SQLComm As SQLCommand
            Dim oReader As SQLDataReader
            Dim sSQL As String
            Dim sConn As String

            sSQL = "SELECT * from CN_Policy_Types"
            sConn = "Server=localhost;Database=**;uid=**;pwd=**;"

            SQLConn = New SQLConnection(sConn)
            SQLComm = New SQLCommand(sSQL, SQLConn)
            oReader = SQLComm.ExecuteReader()

            ddlReason.DataSource = oReader
        End If
End Sub

<asp:DropDownList ID="ddlReason" DataTextField="CN_PolicyName_Nvarchar" DataValueField="CN_PolicyDateIncrement_int" Runat="server" AutoPostBack="True"/>

  #2 (permalink)  
Old December 16th, 2008, 06:01 AM
Wrox Author
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 74
Thanks: 1
Thanked 8 Times in 8 Posts
Send a message via MSN to msellers

Do you get any error messages when you try to run it?

From what you show there there the list should populate.

A few notes though, you REALLY want to make sure that you are always closing the connection.
Mitchel Sellers
Microsoft C# MVP, MCITP
Director of Development
IowaComputerGurus Inc.

My blog for .NET and DotNetNuke info

Author of "Professional DotNetNuke Module Programming"

Tech Editor on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
  #3 (permalink)  
Old February 27th, 2009, 03:06 PM
Registered User
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

please post error_log so that we can locate problem


Php Web Hosting from $3.99/month

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Client Side Script Not Working sramesh ASP.NET 2.0 Basics 3 August 2nd, 2007 03:56 PM
Problem with client side script cschng Classic ASP Basics 2 May 23rd, 2005 12:43 AM
please help ping with client side script nlicata VBScript 0 June 10th, 2004 01:44 AM

All times are GMT -4. The time now is 02:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.