|
You can use Ajax to do like that.
1. Get all data from database
2. Execute one JS fuction to display one record and set the timer
3. If the timer event is fired, you can call the server-side function to get the another record. then, show this record in your webpage. then, change the timer..
I'm not so sure why you want this way..
For me, I tried one similar scenario in my project but I didn't use the dynamic time interval to display the record. I used the static time interval to display the record one by one..
|
|
|
|
|
i dont quite understand the way you did your project. can you please point me in the right direction as to how i can achieve this. And also does it mean i cant use datagrid?
|
|
|
|
|
solarthur01 wrote: does it mean i cant use datagrid?
I didn't use the Datagrid because I don't think the standard Datagrid can handle this kinda scenario.
solarthur01 wrote: i dont quite understand the way you did your project.
Let's say there are 10 records that suppose to be displayed on my page. If I bind those records to GridView then all records will be shown after postback. This is what I don't want. So, I used the DIV and Yahoo animation to display the records with fading effect one by one after 3 or 5 secs.
|
|
|
|
|
You don't need to use AJAX, but you do need to use Javascript. AJAX in action is a good AJAX book. What he means is, no matter what, if you're going to use a datagrid, unless you set it up to create hidden rows and use javascript to show them, what you want to do is probably incompatible with using a data bound control. I'd use a repeater, to give you the control you need over the layout so you can set stuff out to be hidden by default and show it via a script.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
A bit of background before my problem:
We're doing a security overhaul of our internal applications. We've decided that most pages will have 3 forms of security: read-only, partial input, and full control. The read-only and full controls portions are fairly self-explanatory. The partial input version of the page is controlled by the security roles we setup for the various users. One person may have the ability to edit a particular field, while another doesn't.
We receive complaints about hard to read disabled drop down lists. As of right now we have two solutions: javascript that disables clicking on the control, or a custom control that changes the dropdown to a label when it is disabled.
And now the problem:
I'm working on this second option. I created a class that inherits from the DropDown class and created a new property called ChangeToLabel. Code follows:
<br />
Public Class DropDownDisable<br />
Inherits DropDownList<br />
<br />
Dim lbl As New Label<br />
<br />
Public Property ChangeToLabel() As Boolean<br />
Get<br />
Dim s As Boolean = CBool(ViewState("ChangeToLabel"))<br />
Return s<br />
End Get<br />
Set(ByVal value As Boolean)<br />
<br />
If value = False Then<br />
Me.Visible = True<br />
'Me.Enabled = True<br />
lbl.Visible = False<br />
Else<br />
'lbl.Style.ToString = Me.Style.ToString<br />
lbl.CssClass = Me.CssClass<br />
lbl.Width = Me.Width<br />
lbl.Height = Me.Height<br />
lbl.Visible = True<br />
lbl.Text = MyBase.SelectedItem.Text<br />
lbl.ID = Me.ID & "_disabled"<br />
lbl.BorderColor = Color.FromKnownColor(KnownColor.InactiveBorder)<br />
lbl.CopyBaseAttributes(Me)<br />
lbl.Enabled = True<br />
lbl.TabIndex = -1<br />
Me.Visible = False<br />
Me.Parent.Controls.Add(lbl)<br />
End If<br />
End Set<br />
End Property<br />
<br />
End Class<br />
<br />
The problem occurs when the page containing this control posts back. The newly created labels are getting lost. The even stranger problem is that not every label is disappearing. So far, all of the controls that disappear are in a third-party MultiPage control (we use ComponentArt). We run the security methods on every postback, so I'm assuming the labels are on the page in the appropriate places, and that they're just losing their text values. Thanks for any help you can give me.
Tom
|
|
|
|
|
Have you tried setting breakpoints to ensure they are created on a postback ? If it only happens in a third party control, have you asked them ? Their control could be doing something that only they can help you with.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Well, my problem was my own dumb fault. As it turned out, I was doing things in the wrong order. I was creating a new label every time the control was built, instead of only creating a new label when the property was called. Now everything works great. Huzzah!!
|
|
|
|
|
Is there a way to test to see if the compare validator in JavaScript? My issue is I have a calendar extender and the clientside code calls its corresponding update. The problem lies that if the validator returns true that I don't want to the Update to occurs.
Here's a snippet.
function CalStartChanged()
{
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm._doPostBack('UpdatePanel2','');
}
<asp:UpdatePanel ID="UpdatePanel2" runat="Server">
<ContentTemplate>
<asp:TextBox runat="server" id="txtStartDate" Width="100px" CssClass="LeftSelectionSmall"/> <img src="Images/Calendar.jpg" id="btnStartDate" alt="Choose start date." runat="Server"/>
<ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtStartDate" Animated="False" PopupButtonID="btnStartDate" OnClientDateSelectionChanged="CalStartChanged"/>
</ContentTemplate>
</asp:UpdatePanel>
Protected Sub UpdatePanel2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdatePanel2.Load
If scriptManager1.IsInAsyncPostBack And scriptManager1.AsyncPostBackSourceElementID = "UpdatePanel2" Then
dgresults.DataSource = oData.FillDataTable(StrQueryReturn(txtStartDate.Text, txtEndDate.Text, lstShift.SelectedValue, lstSpecies.SelectedValue, lstPackType.SelectedValue))
dgresults.DataBind()
'Put the sql in the cheat box
CB.Text = StrQueryReturn(txtStartDate.Text, txtEndDate.Text, lstShift.SelectedValue, lstSpecies.SelectedValue, lstPackType.SelectedValue)
End If
End Sub
|
|
|
|
|
Hi guy's,
i am suffering from big headache,
we have created an website which is working properly till last saturday on that day i have update some codes for better performance and implement that updated aspx and class in my C:\MyWeb folder by deleting previous files and folder but after that the website giving me error as specify below i dont know why this is happening is this because of the change in files and folders or any other reason behind it
I am working on Visual studio 2005 (Asp.net Version 2.0) and backend SQL Server 2000
when i check the site on my internal ip its working properly but using on external ip this error occured. do i required to set some setting at IIS (Version 5) the link is use windows authentication (anonymous type default password)
Error: "The request timed out before the page could be retrieved "
please give me proper direction so it will help me long life.
Thanks and Regards in advanced
Sasmi
|
|
|
|
|
Hi
After 3 years of bodging our reporting requirements with anything and everything from HTML browser based reports to Tall PDF based reports, and a brief flirtation with ComponentOne's reporting engine we have now decided to attempt to solve this issue once and for all LOL!!!
Anyway we have some very complex reports, some include charts intermingled with tabular data, some require the titles to be displayed vertically etc. and then more simple mail merge type requirements so a good varied range of reporting styles and layouts.
So what are peoples opinions, what are peoples experiences of different tools, anybody used Crystal Reports??
Suggestions please, all help greatly appreciated it looks like a mine field out there everybody claims the earth but little has delivered to date!
Thanks in advance
Andy
|
|
|
|
|
I used to use SQL reporting Service in ASP.NET project..
|
|
|
|
|
Is this SQL 2005 specific?
|
|
|
|
|
Nope.. It can be used with SQL 2000..
|
|
|
|
|
thanks for your feedback Michael much appreciated
can I build reports in the SQL 2005 environmentand then migrate them to SQL 2000, do you know?
does SQL EXPRESS 2005 support trport services?
thanks in advance
Andy
|
|
|
|
|
A point of clarification should be made regarding the relationship between SQL Server and SSRS. Reports developed using SSRS can link to a variety of data sources. These include SQL Server, Oracle, any ODBC-compliant data source and XML. This means that the data for your reports doesn't need to be stored in SQL Server. However SSRS requires an instance of SQL Server to be installed as it stores the metadata for its report catalog in a SQL Server database. This can be either SQL 2000 or SQL 2005.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
AndyBrew70 wrote: can I build reports in the SQL 2005 environmentand then migrate them to SQL 2000, do you know?
downgrading? I wonder why you want to do like that. I never try before..
AndyBrew70 wrote: trport services
I'm not so sure what you meat by trport service.
|
|
|
|
|
I have been looking through an ASP .NET project that is written in VB .NET. I was wondering what #If was and also if that's any different than just an if statement. Could someone please explain? I have been unable to find any information on it.
|
|
|
|
|
I think this is something that is used in C/C++ world. (but of course, it can be used in C# too.)
Check-out the link below for more details..
#if[^]
I never use this in my project so I don't have that much idea about that..
As this article " Conditional Attribute in C# compared to #if #endif[^]" said, conditional attribute might be more readable than #if.
Hope it helps.
|
|
|
|
|
Those are pre-processor directives. It begins with a # symbol. Preprocessor directives are handled by compiler.
|
|
|
|
|
Hi,
i want to upload file in perticular IP Address(Server),
becuase my application is hosted in Three diffrent web servers,
i want save this file in Perticular sand Device which is contain the user uploded files.
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
And what is your problem?
|
|
|
|
|
how i upload file in Sand Device.
means one server to another server.
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
i have a drop down list inside a gridview,i need to get the selecteditem.value of the selected item ,but i am getting only the value for the first item only,even if i select any other item..
heres the code i used plz help me...
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];
string value = selectedRow.Cells[0].Text;
DropDownList ddl = (DropDownList)selectedRow.Cells[5].FindControl("ddlVendorName");
string mystr = ddl.SelectedItem.value;
|
|
|
|
|
mithun narayanan wrote: GridViewRow selectedRow = ((GridView)e.CommandSource).Rows[index];
I think this code might be wrong. As you are getting only one selected row, you won't get the list of rows that you want. So, maybe. You should try to for-loop all rows and get the value..
|
|
|
|
|
i want help for bind data on dropdown selectedindex_changed event
|
|
|
|