Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
| Search | Today's Posts | Mark Forums Read
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 27th, 2007, 06:07 AM
Registered User
 
Join Date: Mar 2007
Location: coimbatore, tamilnadu, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to imjayakumar
Default displying values in dropdownlistbox

hi ,
   iam using asp.net 2003,In that i had use a droplistbox to bind the datas in page_load events as follows

 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        myconnection = New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0; " & _
                                           "Data Source=C:\Inetpub\wwwroot\upload\mydatabase.mdb")
        myda = New OleDbDataAdapter("Select * from t_table ", myconnection)
        ds = New DataSet()
        myda.Fill(ds, "AllTables")
        DropDownList1.DataSource = ds
        DropDownList1.DataSource = ds.Tables(0)
        DropDownList1.DataTextField = ds.Tables(0).Columns("imagepath").ColumnName.ToStr ing()
        DropDownList1.DataValueField = ds.Tables(0).Columns("name").ColumnName.ToString()
        DropDownList1.DataBind()


    End Sub

    Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
        Label1.Text = DropDownList1.SelectedItem.Value.ToString
    End Sub

And setting autopostback property for dropdonlistbox =true.

   after running this webpage when selecting any values in dropdownlistbox its first field values were displaying in label1 ,b'coz of writing code in page_load events. what to do for this.....

jayakumar
 
Old March 30th, 2007, 04:05 AM
Authorized User
 
Join Date: Mar 2007
Location: Baroda, Gujarat, India.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to smp4774
Default

Use IsPostBack. Refer any .Net book/ MSDN help to understand it.

 
Old April 3rd, 2007, 07:19 AM
Registered User
 
Join Date: Mar 2007
Location: coimbatore, tamilnadu, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to imjayakumar
Default

hi,
i had two dropdownlist box in my projects, if iam selecting any value in first dropdownlist box the corresponding value for that should be
display in second drop downlist boxe .So i kept autopost back property to true for first dropdownlistbox......
 if i m selecting any value in first dropdownlistbox the page load event occurs and it automatically selecting the first value in dropdownlist box...what to do
page.ispostback is not worthy here ......

jayakumar




Similar Threads
Thread Thread Starter Forum Replies Last Post
Subreport not displying ceema Crystal Reports 6 March 28th, 2006 04:45 AM
dropdownlistbox and menu ksh_raj General .NET 0 March 14th, 2006 05:03 AM
How to Update a DropDownListBox Macsood ASP.NET 1.0 and 1.1 Basics 1 October 31st, 2005 04:06 AM
loop values and text box values move mateenmohd Classic ASP Basics 2 April 5th, 2005 11:33 PM
Displying Date/time inside a text field spraveens HTML Code Clinic 1 November 14th, 2003 12:06 PM





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