|
I think you miss-read what he said, I thought the same at first. He says to check the current date with the date retrieved from the previous check only (check if its the first, and different to previous), this would only execute once
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Also, if you're using Sql Server you might want to look at Integration Services. It does all that sort of thing.
Regards,
Rob Philpott.
|
|
|
|
|
HarveySaayman wrote: what i need to do is check if the date is the 1st of the month
No, what you need is an API that will create an event on the 1st of the month. You can use a Waitable Timer to do that.
I don't know if this is encapsulated in the .NET BCL yet. If not I recommend developing a C++/CLI assembly that encapsulates it and publishes a managed class for your C# project to work with rather than trying to use PInvoke. But that's just me.
SetWaitableTimer[^]
- pDueTime
-
The time after which the state of the timer is to be set to signaled, in 100 nanosecond intervals. Use the format described by the FILETIME structure. Positive values indicate absolute time. Be sure to use a UTC-based absolute time, as the system uses UTC-based time internally.
led mike
|
|
|
|
|
I have a DataTable that binds to a GridView. In the Gridview I have a HyperLinkField which the DataNavigateUrlField will be determined by a condition. Is it possible to use the Ternary operator w/the Gridview to accomplish this? If so, can some one tell me how as I am having trouble with the syntax for operator?...
<asp:hyperlinkfield>DataNavigateUrlFields="(Condition to Go here)" DataNavigateUrlFormatString="mypage.aspx?id={0}"
DataTextField="Company" DataTextFormatString="{0}" HeaderText="Company Name" />
|
|
|
|
|
Not sure I understand, but...
DataNavigateUrlFields = Condition ? value1 : value2
The ternary operator is a C/C++/C# thing, so I doubt you can have it within the value.
|
|
|
|
|
Hello PIEBald,
Thanks for the reply. I have modified the DataNavigateUrl Fields as such:
<asp:hyperlinkfield>
DataNavigateUrlFields='<%# Eval("Member_Type").ToString() == "I1" ? "ID" : "CO_ID" %>'
However I receive the following error:
Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.HyperLinkField does not have a DataBinding event.
|
|
|
|
|
Hello PIEBald,
I have actually figured out that I should use the ItemTemplate for binding the results. I have bound the field using the ItemTemplate but it seems as though the Navigate Field is not evaluating the ID or CO_ID. It is returning the entire ternary operation as a string as opposed to evaluating the full condition and returning a CO_ID or ID. Can you advise on what I am doing wrong?
<asp:templatefield headertext="Company Name">
<itemtemplate>
<asp:hyperlink runat="server" id="IDType" text="">]]>'
NavigateUrl='viewmember.aspx?id=<%# Eval("Member_Type").ToString() == "I1" ? Eval("ID") : Eval("CO_ID") %>' />
|
|
|
|
|
Hi PIEbald,
I tried the recommended string and I'm still getting the entire condition displaying for the url id. I have even tried doing it this way:
NavigateUrl='<%# "viewmember.aspx?id=" + Eval("Member_Type").ToString() == "I1" ? Eval("ID") : Eval("CO_ID") %>'
Where the page and url variable are within the binding expression. Here the ternary condition evaluates as should, but does not display the "viewmember.aspx?id=" string. Any other suggestions? I know i'm close to getting this as I am a newbie to databinding. Thanks.
|
|
|
|
|
Hi PIEBald,
I figured it out. I had to add the string for the page and url Id to the condition for it to render. See Below and Thanks for all your help.
NavigateUrl='<%# Eval("Member_Type").ToString() == "I1" ? "viewmember.aspx?id=" + Eval("CO_ID") : "viewmember.aspx?id=" + Eval("ID")%>'
|
|
|
|
|
is there any algorithm which helps in deciding the positions of major and minor ticks on scale of graph depending on the range of the scale at runtime.
Please Guide..
|
|
|
|
|
Yes. Whether the particular tool you are using uses it or not is a different story.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
can you please tell me where can i find it... i will try to implement it inC#
thanks
|
|
|
|
|
Hi, i m sending fax by using FAXCOMLIB.DLL in C#. The file i am going to send is PDF file. Everything is fine but when the fax is going to be sent that PDF file opened in Adobe Reader. I just want to send the FAX. I don't want PDF file to be opened in adobe reader. Can any one help me that how can i do this. Thanks in advance
Arslan Ilyas
|
|
|
|
|
Hi all,
i have a question on Configuration settings of a dll .
If i want to get Configuration settings of a dll in my application how can i get that?
I am using Asp.net application .
Thanks
Thanks
Mukkanti
|
|
|
|
|
Put the settings in the web.config file.
Regards,
Rob Philpott.
|
|
|
|
|
ExeConfigurationFileMap map = new ExeConfigurationFileMap();<br />
map.ExeConfigFilename = Path to dll + "config";<br />
Configuration = ConfigurationManager.OpenMappedExeConfiguration(map, ConfigurationUserLevel.None);
only two letters away from being an asset
|
|
|
|
|
I have a string like:
string str = "C:\downloads\fle\abcd\xyz\myfile.exe";
Now how do I extract "myfile.exe" into another string??
Som
|
|
|
|
|
Som.Paul wrote: "C:\downloads\fle\abcd\xyz\myfile.exe"
if u tring to get the file just get it with FileInfo calss and the property FileName
if not just use the Split Method with the "\" delimitor paramter
and get the last string in the array u wiil get
Have Fun
Never forget it
|
|
|
|
|
I cannot use Fileinfo class, it will be a performance issue in my program..
Cant I do it without splitting it into arrays and then extracting??
My program has multiple loops, so that might be an performance issue as well..
Any other method??
Som
|
|
|
|
|
Do This :
<br />
string str = @"C:\downloads\fle\abcd\xyz\myfile.exe";<br />
string TTemp = str.Remove(0, str.LastIndexOf(@"\") + 1);<br />
Have Fun
Never forget it
|
|
|
|
|
use Substring() put last index of \ as start index of Substring()
hope this will help
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
string fileName = System.IO.Path.GetFileName(str);
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Or use a RegularExpression.
But it really depends on what you're doing with the result.
|
|
|
|
|
Some people seem to have an off-day
Path.GetFileName is your friend.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Well, sure, but that's so single-purpose; one should strive to address the bigger picture.
|
|
|
|