|
|
 |
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.
|
 |

December 11th, 2007, 06:37 AM
|
|
Registered User
|
|
Join Date: Dec 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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"/>
|

December 16th, 2008, 06:01 AM
|
|
Wrox Author
|
|
Join Date: Jul 2008
Location: Des Moines, IA, USA.
Posts: 43
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
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"
|

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 |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |