<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[collegamento database alle pagine aspx]]></title><description><![CDATA[<p dir="auto">salve<br />
premetto che come ambiente di sviluppo stò usando Visual Studio 2005</p>
<p dir="auto">Ho creato una pagina aspx,con relativo codice vb allegato.<br />
Adesso nella parte di programmazione vb ho fatto una select al database, richiamado i dati che mi intaressano.<br />
La tabella mi riporta tutti i dati della pagina index, tutti i testi, e tutte le immagini.<br />
I dati sono testi e immagini che vanno a comporre il designer della pagina index.....<br />
Adesso vorrei visualizzare quei dati nella pagina aspx.<br />
Vorrei richiamarli però dicendo alla pagina che nella tabella 1 andrà l'immagine con valore 1 corrispondennel campo tabella successivo andrà il testo con valore 1 (relativo all'immagine), e così via per gli altri campi cambiando il numero di valore a seconda di dove ci troviamo.<br />
Il mio problema è che non sò come inpostare il codice nella pagina????<br />
Qualcuno mi potrebbe aiutare o mandarmi dei link di tutorial dove sia spiegato questo passaggio. Non ho trovato niente!! <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--disappointed" style="height:1.4em;width:auto;vertical-align:middle" title=":(" alt="😞" /><br />
grazie mille<br />
sabry</p>
]]></description><link>https://dev.connect.gt/topic/54121/collegamento-database-alle-pagine-aspx</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 22:35:56 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/54121.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 19 Nov 2007 11:19:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to collegamento database alle pagine aspx on Thu, 22 Nov 2007 16:14:54 GMT]]></title><description><![CDATA[<p dir="auto">allora grazie ad un utente che mi ha aiutato sono riuscita ad andare avanti qualcosina...........:)</p>
<p dir="auto">Nella parte VB ho usato questo codice:</p>
<pre><code>[SIZE=1][COLOR=#0000ff]
Protected[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub[/COLOR][/SIZE][SIZE=1] Repeater1_ItemCommand([/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] source [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Object, [/SIZE][SIZE=1][COLOR=#0000ff]ByVal[/COLOR][/SIZE][SIZE=1] e [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] System.Web.UI.WebControls.RepeaterCommandEventArgs) [/SIZE][SIZE=1][COLOR=#0000ff]Handles[/COLOR][/SIZE][SIZE=1] Repeater1.ItemCommand
[/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] da [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] OleDb.OleDbDataAdapter
[/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] ds [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] DataSet = [/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] DataSet
[/SIZE][SIZE=1][COLOR=#008000]'Ricerca testo nel databse attraverso la query
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] testCMD [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] OleDb.OleDbCommand = [/SIZE][SIZE=1][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=1] OleDb.OleDbCommand([/SIZE][SIZE=1][COLOR=#a31515]"RicercaTesti"[/COLOR][/SIZE][SIZE=1], objDb)
testCMD.CommandType = CommandType.StoredProcedure
[/SIZE][SIZE=1][COLOR=#008000]'Dim RetValue As OleDb.OleDbParameter = testCMD.Parameters.Add("001", OleDb.OleDbType.Numeric)
[/COLOR][/SIZE][SIZE=1][COLOR=#008000]'RetValue.Direction = ParameterDirection.ReturnValue
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] param1 [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] OleDb.OleDbParameter = testCMD.Parameters.Add([/SIZE][SIZE=1][COLOR=#a31515]"001"[/COLOR][/SIZE][SIZE=1], OleDb.OleDbType.Char, 3)
param1.Direction = ParameterDirection.Input
[/SIZE][SIZE=1][COLOR=#008000]'param1.Value = dato
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=1] param2 [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] OleDb.OleDbParameter = testCMD.Parameters.Add([/SIZE][SIZE=1][COLOR=#a31515]"001"[/COLOR][/SIZE][SIZE=1], OleDb.OleDbType.Char, 3)
param1.Direction = ParameterDirection.Input
[/SIZE][SIZE=1][COLOR=#008000]'param1.Value = dato
[/COLOR][/SIZE][SIZE=1]da.SelectCommand = testCMD
da.Fill(ds, [/SIZE][SIZE=1][COLOR=#a31515]"Testi"[/COLOR][/SIZE][SIZE=1])
Repeater1.DataSource = ds
Repeater1.DataBind()
 
 
 
[/SIZE][SIZE=1][COLOR=#0000ff]Catch[/COLOR][/SIZE][SIZE=1] ex [/SIZE][SIZE=1][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=1] Exception
[/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Try
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]End[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]Sub
[/COLOR][/SIZE]
</code></pre>
<p dir="auto">Praticamento uso una store procedure che mi richiama tutti i campi di pagina.</p>
<p dir="auto">Nella parte aspx ho usato un campo Repeater, perche mi permette di formatare in modo abbastanza libero le tabelle che inserisco.</p>
<pre><code>[SIZE=1][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]Panel[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]ID[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="Panel1"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]Height[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="50px"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]Width[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="292px"&gt;
[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]&amp;nbsp;
[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]&amp;nbsp;[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]Repeater[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]ID[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="Repeater1"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]runat[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="server"[/COLOR][/SIZE][SIZE=1][COLOR=#ff0000]DataSourceID[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]="sitoidsistemi"&gt;
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]&lt;[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]itemtemplate[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]&gt;[/COLOR][/SIZE][SIZE=1] &lt;%[/SIZE][SIZE=1][COLOR=#0000ff]#[/COLOR][/SIZE][SIZE=1]DataBinder.Equals(Container.dataitem, [/SIZE][SIZE=1][COLOR=#a31515]"prompt"[/COLOR][/SIZE][SIZE=1])
%&gt;

[/SIZE][SIZE=1][COLOR=#0000ff]&lt;/[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]itemtemplate[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]&gt;
[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]&lt;/[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]asp[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]:[/COLOR][/SIZE][SIZE=1][COLOR=#a31515]Repeater[/COLOR][/SIZE][SIZE=1][COLOR=#0000ff]&gt;
[/COLOR][/SIZE]
</code></pre>
<p dir="auto">Adesso ho ancora questo <strong>grosso problema</strong> per cui necessito ancora del vostro aiuto.</p>
<p dir="auto">Adesso ho i dati di tutti i testi (identificati come codicecampo) della pagina di riferimento.<br />
Ogni codicecampo ha un testo di riferimento</p>
<ul>
<li>
<p dir="auto">Devo trovare il modo di identificare i campo nella pagina aspx con una codifica che grosso modo sarà questa<br />
001<br />
002<br />
003<br />
004<br />
.....</p>
</li>
<li>
<p dir="auto">Devo fare in modo da codice VB che ad agni codice identificativo venga associato il relativo campo di tabella.</p>
</li>
</ul>
<p dir="auto">quindi al valore campo 001...........nel codice VB devo identificare nella tabella a quale riga corrisponde per visualizzare solo quello.</p>
<p dir="auto">Non so proprio come fare <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title=":x:" alt="❌" />x<img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/274c.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--x" style="height:1.4em;width:auto;vertical-align:middle" title=":x:" alt="❌" />x<br />
Confido in voi<br />
aiuto</p>
]]></description><link>https://dev.connect.gt/post/639586</link><guid isPermaLink="true">https://dev.connect.gt/post/639586</guid><dc:creator><![CDATA[sabrinef]]></dc:creator><pubDate>Thu, 22 Nov 2007 16:14:54 GMT</pubDate></item><item><title><![CDATA[Reply to collegamento database alle pagine aspx on Wed, 21 Nov 2007 17:59:12 GMT]]></title><description><![CDATA[<p dir="auto">puoi utilizzare l'oggetto reader come un record di asp non è proprio il massimo dal punto di vista stilistico... però può funzionare</p>
<p dir="auto"><img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=3abbd2034aa" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/639585</link><guid isPermaLink="true">https://dev.connect.gt/post/639585</guid><dc:creator><![CDATA[legolas]]></dc:creator><pubDate>Wed, 21 Nov 2007 17:59:12 GMT</pubDate></item></channel></rss>