Prev: ThreadAbortException at ExportToHttpResponse()
Next: Ajax PageRequestManagerServerErrorException unknown error afterappliocation is idle
From: Aussie Rules on 6 Jun 2007 02:40 Hi, Sorry I actually removed the catch code to save space. There was no error created(catch never got fired) Thanks "Alexey Smirnov" <alexey.smirnov(a)gmail.com> wrote in message news:1181069669.585860.42180(a)p77g2000hsh.googlegroups.com... > On Jun 5, 7:26 pm, "Aussie Rules" <AussieRu...(a)nospam.nospam> wrote: >> Hi, >> >> Thanks for your reply. >> >> I am still not able to get this to work. My code is as follows. When I >> view >> source of the HTML page, there are no values for the adrotator at all. >> The Stored Proc works fine. >> >> I can't see whats wrong...... >> > > Aussie, > > get rid of the try..catch block, I think you will see what is wrong. > > Hope it helps >
From: Alexey Smirnov on 6 Jun 2007 02:53 On Jun 6, 8:40 am, "Aussie Rules" <AussieRu...(a)nospam.nospam> wrote: > Hi, > Sorry I actually removed the catch code to save space. There was no error > created(catch never got fired) > > Thanks > > "Alexey Smirnov" <alexey.smir...(a)gmail.com> wrote in message > > news:1181069669.585860.42180(a)p77g2000hsh.googlegroups.com... > > > > > On Jun 5, 7:26 pm, "Aussie Rules" <AussieRu...(a)nospam.nospam> wrote: > >> Hi, > > >> Thanks for your reply. > > >> I am still not able to get this to work. My code is as follows. When I > >> view > >> source of the HTML page, there are no values for the adrotator at all. > >> The Stored Proc works fine. > > >> I can't see whats wrong...... > > > Aussie, > > > get rid of the try..catch block, I think you will see what is wrong. > > > Hope it helps- Hide quoted text - > > - Show quoted text - Well, are you sure that sproc_GetBannerAdvertDetails is working? Try to execute it in the Query Analizer (or any other tool to check the db output)
From: Steven Cheng[MSFT] on 6 Jun 2007 03:36
Hi Aussie, I'm not sure about your backend datasource. I suggest you perform the following checK 1. Direclty bind the DataReader(get from SqlCommand) to a GridView (with AutoGenerateColumns="true") to verify whether the reader has returned the correctly & expected resultset 2. For databinding code logic, here is the code in my local test page for your reference: ================================= Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load BindRotator() End Sub Private Sub BindRotator() Dim conn As SqlConnection Dim comm As SqlCommand Dim sql As String = "SELECT [id], [name], [description] FROM [RVTable]" Dim rdr As SqlDataReader conn = New SqlConnection(WebConfigurationManager.ConnectionStrings("ASPNETTestDBConnect ionString").ConnectionString) conn.Open() comm = New SqlCommand(sql, conn) rdr = comm.ExecuteReader() AdRotator1.DataSource = rdr AdRotator1.ImageUrlField = "name" AdRotator1.NavigateUrlField = "description" AdRotator1.DataBind() rdr.Close() conn.Close() End Sub ================================ If you have any further finding or question, please feel free to post here. Sincerely, Steven Cheng Microsoft MSDN Online Support Lead This posting is provided "AS IS" with no warranties, and confers no rights. |