p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Register | FAQ | Members List | Calendar | 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
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

Hello,

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)
            SQLConn.Open()
            SQLComm = New SQLCommand(sSQL, SQLConn)
            oReader = SQLComm.ExecuteReader()

            ddlReason.DataSource = oReader
            ddlReason.DataBind()
        End If
End Sub
</script>


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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old December 16th, 2008, 06:01 AM
Wrox Author
Points: 201, Level: 4
Points: 201, Level: 4 Points: 201, Level: 4 Points: 201, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 43
Thanks: 0
Thanked 6 Times in 6 Posts
Send a message via MSN to msellers Send a message via Skype™ to msellers
Default

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"

Author on "Visual Studio 2010 six-in-one" and "Pro C# 4.0"
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #3 (permalink)  
Old February 27th, 2009, 03:06 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2009
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

please post error_log so that we can locate problem

______________________________________________

Php Web Hosting from $3.99/month
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Client Side Script Not Working sramesh ASP.NET 2.0 Basics 3 August 2nd, 2007 04:56 PM
Problem with client side script cschng ASP Forms 1 June 8th, 2005 09:53 AM
Problem with client side script cschng Classic ASP Basics 2 May 23rd, 2005 01:43 AM
please help ping with client side script nlicata VBScript 0 June 10th, 2004 02:44 AM
Client side code not working Ajay Jain ASP.NET 1.1 9 May 1st, 2004 07:10 AM



All times are GMT -4. The time now is 06:52 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc