Monday, March 26, 2012

UpdatePanel + DataReader

Hello,

I have problems to use ATLAS in combination with DataReader and:

Do While myReader.Read()
...
...
Loop

Does ATLAS work with ratareader or only with ServerControls?

Christian

ATLAS has little to do with DataReader. Whatever problem you're having, it's most likely related to how you're using your DataReader. Either provide more details or try to do whatever you're doing in normal ASP.NET to see if it's possible at all.

This is the code:

<HEAD id=Head1 runat="server"> <?xml:namespace prefix = atlas /><atlas:ScriptManager id=scriptmanager1 runat="Server" EnablePartialRendering="true"></atlas:ScriptManager><FORM runat="server"><?xml:namespace prefix = asp /><asp:CheckBox id=csharp runat="server" AutoPostBack="True"></asp:CheckBox>C#<BR> <asp:CheckBox id=vbnet runat="server" autopostback="true"></asp:CheckBox>VBNet<BR> <asp:Label id=Header runat="server" Text="Label"></asp:Label> <DIV class=tabs><atlas:UpdatePanel id=panel1 runat="server" RenderMode="Inline" mode="Always"><CONTENTTEMPLATE> <% Dim DBConnection As OleDbConnection = New OleDbConnection Dim Adapter As OleDbDataAdapter = New OleDbDataAdapter Dim SortiertDS As DataSet = New DataSet Dim SelectStatement As String Dim csharp, vbnet As String SelectStatement = "Select * From jobs Where lfdnr=lfdnr " csharp = Trim(Request.Form("csharp")) If csharp <> "" Then SelectStatement = SelectStatement & " and csharp=-1 " End If vbnet = Trim(Request.Form("vbnet")) If vbnet <> "" Then SelectStatement = SelectStatement & " and vbnet=-1 " End If DBConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\inetpub ..." DBConnection.Open() Dim OleDbCommand As OleDbCommand = New OleDbCommand(SelectStatement, DBConnection) Dim myReader As OleDbDataReader myReader = OleDbCommand.ExecuteReader Do While myReader.Read() Response.Write(myReader!titel.ToString & "<BR>") Loop %> </CONTENTTEMPLATE></atlas:UpdatePanel> </DIV> </FORM>
Thanks for all help!
 
Christian


Christian, atlas should not impact your datareader code above. What happens when you have the same code without atlas?


The code works without atlas it works well.
So I see I havn't understood atlas yet ;-(
hello.

you're using asp.net a la asp...why don't you use a data bound control to show your data to the user?

OK, these are my first steps.

The GridView Object doesn't fit to my aim.

I want to select something from the database and show these selection in a special fomatted way.

If you can show me a asp.net way (Link, tutorial) how to do it, this will be great.

regards

Christan


hello.

well, the gridview control is a good control if you're trying to show data and want it to be formatted like a grid. beside this control, you also have a repeater, data list, etc...so i guess it all depends on what you're trying to do. can you gives us more details on the kind of layout you're intested?

I want to program an individual online-Shop.

The shop shall show the articles in a formatted way:

picture, description, price etc.

I think I have to work with the repeater or with the datalist ...

regards

Christian

No comments:

Post a Comment