|
you can use AJAX timer control.
or can create Different Windows services that can invoke some methods of your web application
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
An asp page doesn't run unless someone is requesting it, so an asp application is not really suitable for scheduling.
Do you really have to run the code every hour, even if noone is watching the page? Can't you just check how long it was since the information was last updated, and fetch new information if it's older than one hour?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
yes u r right ues i want to run the code every hour if none is watching
i have web space but rhey r not alowing to run the window service on their server
is there any another method without windows service
|
|
|
|
|
You can write a regular application and run it from the scheduler.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
I want to program a custom web control by C#, such that user can access
(save and open) the local PC files and connect to the internet via http,
is it possible ? Are there any limitation for a web control similar to java applet ?
Thanks
Dolphin
|
|
|
|
|
You can't do this with ASP.NET, but you could do it in C#. Yes, there will be limitations, not sure what tho, I'm sure they are similar.
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 )
|
|
|
|
|
I have been using the asp.net treeview control but I am having trouble.
I have set level styles for each level of the treeview which has images for expanded and collapsed nodes.
The lowest level node displays no images which I would expect but it also displays the nodes with larger spacing between them.
Could someone provide a solution as to how I can control this spacing.
Below is the theme
asp:TreeView runat="server" SkinId="FolderList" VerticalPadding="0px" ChildNodesPadding="0px" NodeSpacing="0px" >
<ParentNodeStyle VerticalPadding="0px" ForeColor="White" />
<LeafNodeStyle VerticalPadding="0px" ChildNodesPadding="0px" NodeSpacing="0px"/>
<RootNodeStyle Font-Names="Arial" ForeColor="White" VerticalPadding="0px" />
<LevelStyles>
<asp:TreeNodeStyle
Font-Bold="true"
Font-Size="9pt"
ForeColor="Black"/>
<asp:TreeNodeStyle
Font-Size="8pt"
ForeColor="#282828"/>
<asp:TreeNodeStyle
VerticalPadding="0px"
NodeSpacing="0px"
ChildNodesPadding="0px"
Font-Size="8pt"
ForeColor="Red"/>
<asp:TreeNodeStyle
VerticalPadding="0px"
NodeSpacing="0px"
ChildNodesPadding="0px"
Font-Size="8pt"
ForeColor="Orange"/>
<asp:TreeNodeStyle
VerticalPadding="0px"
NodeSpacing="0px"
ChildNodesPadding="0px"
Font-Size="8pt"
ForeColor="#6E6E6E"/>
</LevelStyles>
</asp:TreeView>
|
|
|
|
|
Hi Friends,
My Scenario is
I've got two controls TextBox and DropDownlist. I want to validate these as
If Textbox is empty then you must select a valued from dropdown list , if text box is not empty then its up to user weather he/she wants to select a value from dropdownlist or not.
Can I validate using Validation controls? If yes then how ?
Any example or source code will be appreciated.
|
|
|
|
|
Just a quick question. Where is the place you need to check this. I mean on a button click or something ?
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Yes on an image button click.
I am after client side validation!
|
|
|
|
|
use this:
<asp:requiredfieldvalidator id="RequiredFieldValidator1">
runat="server"
ErrorMessage="Required Field"
ControlToValidate="textbox">
</asp:requiredfieldvalidator>
|
|
|
|
|
Ok then create a javascript to validate your control.
if say
function validate()
{
//Check if the text box value is blank
if(document.getElementById("txtBox1").Value.length == 0)
{
//If yes check if the value of listbox is null
if(documen.getElementById("listbox").Value == null)
{
alert("You have to select a value");
return false;
}
}
}
Now in the OnClientClick property of the image button give this funcion name
You probably will not be able to achieve this using validation controls becuase they can be used against only one control.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Hi all, I need one timer control which shows 24 hr time. Is any readymade control available for us?..plz help me
Amit
|
|
|
|
|
You can do it really simple using a java script.
function setCurrentTime()
{
var now = new Date();
document.getElementById("currentTimeDiv").innerHTML = "" + now.getDate() + "/" + (now.getMonth() + 1) + "/" + now.getFullYear() + " - " + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds() + "";
}
Now call this function in Body Onload by a setInterval function
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Thanx for the reply..
I will try it...
Amit
|
|
|
|
|
do you mean you would like to display clock with 24 hour time
or do you mean you want to set a timer starting a countdown from 24 hour?
You can use ajax timer control which might have a custom setting to set to 24 hour
|
|
|
|
|
First of all thanx..
We want to display a 24 hour clock in our forms...and the time can be manipulated as it is possible with standard timer control...Will ajax timer control is helpful for me..?
Amit
|
|
|
|
|
Ajax timer control cannot be used in your cause. ajax timer control is used to run some server side code in predefined intervals. Technically it is possible to use ajax timer control,updae panel and a simple label to simulate such timer.But you dont want your application to post back every 1 sec to get a new time. Do you ?
You have to use the javascript to do this.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
I want to bind hyperlink control which is inside the Gridview and navigate to the URL which is coming from a variable in the cs file of same application
Anyone have any idea?
Thanks in advance,
|
|
|
|
|
Create the field as a template field.
<asp:templatefield headertext="Timetable">
<itemtemplate>
<a href="'<% = [Your variable name] %>'">Name here </a>
</itemtemplate>
</asp:templatefield>
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Inside a GridView i m writing like this
<asp:templatefield headertext="hyperlink">
<itemtemplate> <asp:hyperlink id="hlink" runat="server" navigateurl="">]]>' Target="_blank">Download Here
But its not working
i have a variable where i had my filepath which i m getting after coding for getting URL
and giving the hyperlink the variable name as DataBinder.Eval
But its not working
|
|
|
|
|
I guess DataBinder.Eval with serch with in the GridView's Data source to find out the value. You may also try putting the hyperlink in a hidden filed and do like this ( say the hidden field name is txtHidden )
<asp:hyperlink id="hlink" runat="server" navigateurl="'<% = txtHidden.Value %>'">Download Here </a>
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
Thanks everybody for replying the problem is solved...........
|
|
|
|
|
Hi, I am writing a stored procedure in SQL server 2005, and when I want to save it gives me two mistakes for @AddedDate and @ArticleId. Any Help??? Thanks Ahead, below is my stored procedure:
CREATE PROCEDURE dbo.tbl_Artikl_InsertArticle
{
@AddedDate datetime,
@AddedBy nvarchar(256),
@CategoryID int,
@Title nvarchar(256),
@Abstract nvarchar(4000),
@Body ntext,
@Country nvarchar(256),
@City nvarchar(256),
@ReleaseDate datetime,
@ExpiryDate datetime,
@Approved bit,
@Listed bit,
@CommentsEnabled bit,
@OnlyForMembers bit,
@ArticleID int OUTPUT
}
AS
SET NOCOUNT ON
INSERT INTO tblArtikl
(AddedDate, AddedBy, CategoryID, Title, Abstract, Body, Country, City, ReleaseDate, ExpiryDate, Approved, Listed, CommentsEnabled, OnlyForMembers)
VALUES (@AddedDate, @AddedBy, @CategoryID, @Title, @Abstract, @Body, @Country, @City, @ReleaseDate, @ExpiryDate, @Approved, @Listed, @CommentsEnabled, @OnlyForMembers)
SET @ArticleID = scope_identity()
|
|
|
|
|