Thank you again Jason!
Unfortunately Tek-tips is blocked at my work (don't know why) so I couldn't read your post but I cracked it after a day of fiddling.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
SqlDataSource1.SelectParameters(0).DefaultValue =...
Thank you Jason - I've tried your bit of code (I'm using VB though so its a bit different):
<script runat="server">
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Page.IsPostback Then
SqlDataSource1.Parameters(0).Value = User.Identity.Name...
Thanks ca8msm! Knowing me, I'm probably not setting the parameter correctly. I've searched and searched but cant find the way to do it.
PS I cant see SQL Profiler - I'm guessing this comes with the full version of SQL. I'm using the Express interface to connect to my hosted SQL database remotely.
Hi all
I'm using the following data source to populate a gridview. It is supposed to only return the records for the current user who is logged in.
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:StPaulsDatabase %>"
SelectCommand="SELECT...
PS I just noticed that everytime you refresh their page, the images load up in a completey different (seemingly random) order.
This would be a bonus (but is not essential).
Hi all
I would like to create a flash animation like this (but a much more simple version).
http://www.frenchconnection.co.uk/uk/index.html
I will have several images on different layers overlapping each other. When the user rolls over an image with their mouse, it is brought to the front...
Hello
I am using a form with a subform. The subform lists a collection of jobs, each with an estimated duration and an actual duration. I'm using the progress bar to give a graphic indication of progress by doing:
I have an afterUpdate event which will run the following code to update the...
Great thanks!
I've been learning ASP .net for a few weeks but was just hoping to reuse an old piece of code which I had from when I was using classic ASP.
But I do get what you're saying! I need to do this bit from scratch.
Thanks for your help - I'll get the book out and give it ago.
Thanks...
Hello
I'm using the following code to dynamically create a three column table of photographs retrieved from a database.
However, when compiling I am receiving an error to say that the variables count and myMod are not declared. Is this because I am using the variables inside the repeater...
Ah ok I see! I haven't been using the code-behind file, I've been putting my code in the page itself but I will give that a go!
Many thanks to both of you for the advice.
DS
I'm sorry, I don't mean JavaScript.
I mean if you wanted to use something like this
Function RandNum(Limit As Integer) As Integer
Dim Num As Integer
Randomize
Num=Int(Rnd * Limit)+1
Return(Num)
End Function
And you wanted to call this function in your Content page. Functions like this...
Master Pages look great but what happens when you're using master/content pages and in your content pages you want to use some code (functions for example)?
The code needs to go in the <script></script> tags which appear in the Head of the Master Page.
Surely you don't have to put all your...
Brilliant thank you very much!!
GetDate() does work perfectly.
I'm sorry I should have put this in the SQL forum but I was thinking I'd have to get ASPX to put the date into the sQL. I know for next time!
Thank you both.
Daniel
Actually please forget the code I put above. It doesn't work because I wrote the date the wrong way. This is how my code looks:
SELECT downloadID, downloadTitle, downloadFilename, downloadFileSize, downloadFileType, downloadAddedOn, downloadShowFrom, downloadShowUntil...
Morning all
I'm using the following data source to retrieve some data from a database:
<asp:SqlDataSource ID="ds_downloads" runat="server" ConnectionString="<%$ ConnectionStrings:StPaulsDatabase %>"
ProviderName="<%$ ConnectionStrings:StPaulsDatabase.ProviderName %>" SelectCommand="SELECT...
Thank you vbkris - I tried the following but it doesn't work.
<asp:BulletedList ID="releteddownloads" runat="server" DataSourceID="ds_relateddownloads"
DataTextField="downloadTitle" DataValueField="downloadFilename" DisplayMode="HyperLink">
</asp:BulletedList>
<asp:SqlDataSource...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.