Tşk ederim ama bu karışık geldi bende şöyle bir yöntem uyguladım.
Public
javascripttext As String
Public myarraytext As String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' Burada ilgili veri tabanı işlemlerini yapabiliriz.
Dim Sayi As Integer
Sayi = 4
For j = 1 To Sayi
If j = Sayi Then
myarraytext = myarraytext +
"[""images/" & j & ".jpg""" + "," + """a""" + "," + """b""" + "," + """c""" + "]"
Else
myarraytext = myarraytext +
"[""images/" & j & ".jpg""" + "," + """a""" + "," + """b""" + "," + """c""" + "],"
End If
Next
javascripttext =
"<script type=""text/javascript"">" + "var mygallery = new simpleGallery({wrapperid:""simplegallery1"",dimensions: [400, 250]," + "imagearray:[" + myarraytext + "]," + "autoplay: [true, 2500, 2]," + "persist: false," + "fadeduration: 500," + "oninit: function () {}," + "onslide: function (curslide, i) {}" + "});" + "</script>"
End Sub
aspx kısmı ise<
head>
<title></title>
<
script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<
style type="text/css">
#simplegallery1
{
position: relative;
visibility: hidden;
border: 2px solid gray;
}
#simplegallery1 .gallerydesctext
{
text-align: left;
padding: 2px 5px;
}
</
style>
<
script src="js/simplegallery.js" type="text/javascript"></script>
<%
= javascripttext%>
</
head>
<
body>
<form id="form1" runat="server">
<div id="simplegallery1">
</div>
<br />
</form>
</
body>