|
Hi guys
I want my webside to be able to slide pictures after pressing a linkbutton. Do you have any suggestions how to load the pictures. I have tried to load it directly from my folder after the linkbutton is pressed and thereby updating a counter variable, but my problem is that every time the linkburtton i pressed the page is loaded again and the counter is reset to its original value, how can I get around this problem?...
Regards
Al
|
|
|
|
|
Sounds like you want to use AJAX, or if you want to do a postback, store your counter in viewstate ( assuming ASP.NET ), or a hidden control.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Have a look at something like Lightbox[^] as a JavaScript image slideshow library. If you want to stop a link reloading a page you need to return false from the onclick handler:
<a href="" onclick="do something; return false"/>
|
|
|
|
|
|
Hi Guys,
I have problems declaring ubound array.
As you can see my source code below, the arrays was declared as Dim data(5000) as double.
Do you have an idea on how to declare it dynamically?
Thank you Guys
Dim data(5000) As Double
Dim labels(5000) As String
cmd.CommandText = "exec GetRecords '1', '5/20/2007'"
cmd.CommandType = CommandType.Text
cmd.Connection = sqlConn
da = New Data.SqlClient.SqlDataAdapter(cmd)
da.Fill(ds)
For iCtr = 0 To ds.Tables.Item(0).Rows.Count - 1
data(iCtr) = ds.Tables.Item(0).Rows(iCtr).Item(1).ToString()
labels(iCtr) = ds.Tables.Item(0).Rows(iCtr).Item(2).ToString()
Next
da.Dispose()
ds.Dispose()
sqlConn.Close()
hifiger2004
|
|
|
|
|
The questions that you are asking has actually nothing to do with web development, but they are specific to Visual Basic. You should ask in the VB forum instead.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi Guys,
This is my first time to use the For...Next statement in ASP.Net.
Can you help me on how to program a For...Next using my code below?
There's a "For each row in" statement in my code but it is not yet done, because I don't know how to do it.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strConnString As String = ConfigurationManager.ConnectionStrings("dbConnection").ConnectionString
Dim sqlConn As New Data.SqlClient.SqlConnection(strConnString)
Dim cmd As New Data.SqlClient.SqlCommand
Dim da As Data.SqlClient.SqlDataAdapter
Dim ds As New Data.DataSet
cmd.CommandText = "select SampleID, DealerID from tblSample where SampleID in (1,2,3,4,5)"
cmd.CommandType = CommandType.Text
cmd.Connection = sqlConn
da = New Data.SqlClient.SqlDataAdapter(cmd)
da.Fill(ds)
For each row in
Next
For iCtr = 0 To ds.Tables.Item(0).Rows.Count - 1
MsgBox(ds.Tables.Item(0).Rows(iCtr).Item(2).ToString())
Next
da.Dispose()
ds.Dispose()
sqlConn.Close()
-- modified at 11:47 Saturday 9th June, 2007
hifiger2004
|
|
|
|
|
I think this is what you are looking for:
For Each row As DataRow in ds.Tables.Item(0).Rows
MessageBox.Show(row.Item(2).ToString())
Next
Although, a messagebox doesn't really work in a web page. If it shows at all, it's because of the combination of two special cases; you are using the same computer as server and client, and the server code happens to run under your user account so that it happens to have a user interface.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank you Guffa
hifiger2004
|
|
|
|
|
Just disregard this issue. I already solved it guys.
Hi Guys,
Can you help me if what's wrong with my source code? I am using ASP.Net 2.0 and I got an error in "MsgBox(ds.Tables.Item("SampleID").ToString())"
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim strConnString As String = ConfigurationManager.ConnectionStrings("MyConnection").ConnectionString
Dim sqlConn As New Data.SqlClient.SqlConnection(strConnString)
Dim cmd As New Data.SqlClient.SqlCommand
Dim da As Data.SqlClient.SqlDataAdapter
Dim ds As New Data.DataSet
cmd.CommandText = "select SampleID, RowID from tblSample where SampleID = 100"
cmd.CommandType = CommandType.Text
cmd.Connection = sqlConn
da = New Data.SqlClient.SqlDataAdapter(cmd)
da.Fill(ds)
MsgBox(ds.Tables.Item("SampleID").ToString())
MsgBox(ds.Tables.Item(0).Rows(0).Item(1).ToString())
da.Dispose()
ds.Dispose()
sqlConn.Close()
-- modified at 10:03 Saturday 9th June, 2007
hifiger2004
|
|
|
|
|
For anyone else searching wondering what's wrong, this is server side code, you can't display message boxes that will be visible in the browser. Try writing the field contents to the web page you are creating:
Response.Write(ds.Tables.Item("SampleID").ToString())
|
|
|
|
|
Hi,
I have a website with dotnet application which is a http site. i have to change a single page in the site into https page. ie., for ex.. if i have http://www.yahoo.com/inbox.aspx,... i have to change it to https://www.yahoo.com/inbox.aspx...... Further, my site is already RSA secured. I have SSL certificate also. Iam working with IIS server in windows XP. Anybody pls tell me the steps to convert Http to Https using SSL in Asp.Net?
Regards
Vijay.
|
|
|
|
|
Don't cross post. Your question has been answered on another forum.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Hi Guys,
I have a stored procedure getData(value1, value2), and the result is a records.
Sample Results:
Column1 Column2
1 Red
2 Blue
3 Green
What is the correct way of calling the stored procedure and place the result in a dynamic array. Let's say the Column1 and Column2 are place in an array.
Do you have a sample asp.net vb type of source code that will call the stored procedure and the result will be place in a dynamic array?
I hope you can help me with this guys.
hifiger2004
|
|
|
|
|
You can get the data using stored procedure like this.[^].
If you are having the data in dataset then you can put it whereever you want.
Best Regards,
Apurva Kaushal
|
|
|
|
|
hello !!!
cud neone hlp me find out how can i prevent users from saving the web page on their local systems ....i:e no File-> save as ...
MARTAND SHARDUL
|
|
|
|
|
I doubt that's ever been possible, but the advent of things like Firebug make it completely impossible. Users can copy and paste your HTML, quite trivially.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
There's a hack you can use that'll prevent it from working in some versions of IE. But as CG stated, you really can't prevent it reliably.
If you really need your users to be annoyed when they use your site, consider using lots of animation, clashing colors, and popups every time they click something. If they never come back, they'll never be able to save...
----
...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
That would make for one interesting article!
|
|
|
|
|
LOL - this made my day.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Just to confirm, not possible.
Brad
Australian
- "Bash.org" on "The opposite of Love"
<+pf_work> what's the opposite of <3?
<Lokii> h8
<Rodry> </3
<sdoherty> >3
<Lems> !<3
|
|
|
|
|
Hi all.
I managed to get this code but cant tell why it doesnt show the results.Its suppose to display the dropdownlist with all the values from the database.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Option Explicit
'-- Variables we are using
dim objConn, objRS, objRS2, strSQL
'-- Define our objects
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
Set objRS2 = Server.CreateObject("ADODB.Recordset")
'-- Database path and Data provider
objConn.ConnectionString = Server.MapPath("C:\dropdowns.mdb")
objConn.Provider = "Microsoft.Jet.OLEDB.4.0"
objConn.Open
'-- Sub Procedure that builds the dropdown list
Sub showDropDownList(c, r, table)
'-- SQL Statement
strSQL = "SELECT * FROM " & tblDropDownTest & " ORDER BY Title ASC"
'-- Execute our SQL statement and store the recordset
Set r = c.Execute(strSQL)
'-- If we have records to return
if r.eof = false then
'-- Open a form/select tag
Response.Write ""
Response.Write "" & vbCrLf
Response.Write "Choose...."
'-- loop and build each database entry as a selectable option
While r.EOF = false
Response.Write "" _
& r.Fields("Title").Value & "" & vbCrLf
'-- Move recordset to the next value
r.movenext
Wend
else
response.write"<"Sorry, no records selected">"
end if
'-- close select/form tags
Response.Write "" & vbCrLf
End Sub
'-- Sub Procedure that builds the dropdown list
Sub showDropDownList2(c, r, table)
'-- SQL Statement
strSQL = "SELECT * FROM " & tblDropDownTest & " ORDER BY Title ASC"
'-- Execute our SQL statement and store the recordset
r.Open strSQL, c, 3, 3
'-- If we have records to return
if r.eof = false then
'-- Open a form/select tag
Response.Write ""
Response.Write "" & vbCrLf
'-- loop and build each database entry as a selectable option
'filter
r.Filter = ("Type = 'fruit'")
Response.Write "Choose...."
Response.Write ""
While r.EOF = false
Response.Write "" _
& r.Fields("Title").Value & "" & vbCrLf
'-- Move recordset to the next value
r.movenext
Wend
r.Filter = adFilterNone
r.Filter = ("Type = 'veg'")
Response.Write ""
While r.EOF = false
Response.Write "" _
& r.Fields("Title").Value & "" & vbCrLf
'-- Move recordset to the next value
r.movenext
Wend
end if
'-- close select/form tags
Response.Write "" & vbCrLf
End Sub
%>
<title>Dynamic dropdown lists in ASP(VBScript) - designplace.org
Dynamic dropdown lists using Active Server Pages and Microsoft Access
Below is an example of a drop down list, dynamically populated from a
database table.
<%
' -- Call the sub procedure to build the drop down list, with the connection and recordset objects and the source table (In quotes).
call showDropDownList(objConn, objRS, "tblDropDownTest")
Sub showDropDownList(c, r, table)
'-- SQL Statement
strSQL = "SELECT * FROM " & tblDropDownTest & " ORDER BY Title ASC"
'-- Execute our SQL statement and store the recordset
Set r = c.Execute(strSQL)
'-- If we have records to return
if r.eof = false then
'-- Open a form/select tag
Response.Write " "
Response.Write "" & vbCrLf
Response.Write "Choose...."
'-- loop and build each database entry as a selectable option
While r.EOF = false
Response.Write "" _
& r.Fields("Title").Value & "" & vbCrLf
'-- Move recordset to the next value
r.movenext
Wend
else
response.write"<"Sorry, no records selected">"
end if
'-- close select/form tags
Response.Write "" & vbCrLf
End Sub
%>
Here is the same drop down list, but this time it has been filtered to show
fruit first under a heading, then veg.
<%
' -- Call the sub procedure to build the drop down list, with the connection and recordset objects and the source table (In quotes).
call showDropDownList2(objConn, objRS2, "tblDropDownTest")
%>
© designplace.org - Feb 2003
kagiso
|
|
|
|
|
I m not understand wat is your problem is just write wat is the problem not all coding..
|
|
|
|
|
--------------------------------------------------------------------------------------------------
Hiral Shah
India
|
|
|
|
|
Hi to all,
does any one knows how it is possible to control file input type field at form? I read a lot about this and i tried a lot of examples and suggestions but I couldn't get good results.
If it is possible to do it by HTA which has APPLICATION=yes as attribute then how? I also tried to use ActiveXObject classes, last one which I tried is InternetExplorer.Application.
Main issue with solutions in VBS and JScript is ADODB.Stream which is loading complete file in client memory. If I tried to upload at least 700MB to server by some working code I get error message from script that there is no more memory to store a file.
HELP, please if there is any solution to use existing file input field and to change value dynamically to upload multi files.
Sniffer
|
|
|
|