Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
Password Reminder
Register
| FAQ | Members List | 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 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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
Reply With Quote
  #2 (permalink)  
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.

Reply With Quote
  #3 (permalink)  
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
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

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



All times are GMT -4. The time now is 07:02 AM.


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