|
|
Hi,
i have a requirement to send sms to users for every 5 min getting new data from databse. sending sms in diff conditions. Need to some on specific timings like that etc.
I want to do this using windows services. is it ok for me to start with this? Or any other better alternative is there to do this ?
G. Satish
|
|
|
|
|
HI,
YOu can use BackgroundWorker if you are working in Windows Form Application.
Naresh Patel
|
|
|
|
|
N a r e s h P a t e l wrote: use BackgroundWorker if you are working in Windows Form Application.
Background worker class is not limited to windows applications. It can be used in web applications too. It's juts a helper class for threading.
|
|
|
|
|
Yes windows services is a good way to go.
|
|
|
|
|
I disagree as he doesn't need a realtime process. I think too many people write WindowsServices when a service isn't specifically needed. I propose that you should write a simple console application and use the scheduling functionality of the OS to run that console application on the time frame you need.
|
|
|
|
|
ChrisKo wrote: should write a simple console application and use the scheduling functionality of the OS to run that console application on the time frame you need.
A console application that exists automatically once the job done, right ? But OP says, he needs to run it every 5 minutes. So the console application approach will open a console window every 5minutes on the server, do you think it's an issue ?
I was telling OP to use windows service because of this reason. A thread should work on the service which does the job and sleeps for next 5minutes. I still believe that will be a good idea. But you have a very valid point. Thanks for that.
|
|
|
|
|
i use this code in my page
value="<%#Session("lastname")%>">
and get this when i run project'''
Compiler Error Message: CS0118: 'System.Web.UI.Page.Session' denotes a 'property' where a 'method' was expected
so help me in value="<%Session("lastname")%>">
it is on 2003 .net
Raghvendra
|
|
|
|
|
why dont you set the session in the c# code
slname.text = Session["lastname"].ToString();
|
|
|
|
|
<%# %> = Databinding
<%= %> = Response.Write
I believe you want the second option. You also might need to call ToString() on that Session call. It's been a while since I've used 1.1, so I cannot remember if the default is already to return the string value.
|
|
|
|
|
There is a bit type field in my database , which stores 0 0r 1
i am writing the following code
<asp:Label ID="lname" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"HighAltitude").ToString()=="0" ? "Normal" : "High" %>'></asp:Label>
I have two records in my database , first occupy 0 and other occupy 1
but my both records in the gridview shows High status.
Please help.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
do you mean in the label they both show as high,
dont you need to do something like this
if (datafield == '0')
{
label = high
}
else if (datafield == '1')
{
label = low
}
what youve put above doesnt make sense i dont think
|
|
|
|
|
i was trying to do like the iif in vb.net and same can be done in c# via
a == 1 ? "2" : "3"
and i want to do in the html file, not in code behind.
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
You should do this in code behind. Why would you use code in mark-up? This is Asp.Net not Classic Asp.
Do this: in Code behind (probably in the DataBound event or whatever is appropriate to what you are trying to accomplish):
string highAltitude = (HighAltitude == 0) ? "Normal" : "High";
this.lname.Text = highAltitude;
|
|
|
|
|
hi,
i want to know did i can convert from my vb application form to a web base application from, i try using ASP.NET, and vb language.
the situation is here, i have create a simple server client window application using tcp/ip, then next i want my application avaiable in web base application, did i need to make new application or i can convert my application?
Or anything that similiar can i use, i've tired in searching any help in the internet, this is my last option.
anyone can help me, please.
very thanx in advance..
|
|
|
|
|
You can make ActiveX Control and that you can use it in web page
Best Regards
-----------------
Abhijit Jana
Microsoft Certified Professional
"Success is Journey it's not a destination"
|
|
|
|
|
I logged in to my account in codeproject. Then I took another instace of the browser. In that also I opened codeproject. Then that session is available in the newly opened browser. How is it made possible?
|
|
|
|
|
When logged in, you might have checked "Remember me" check box. It uses a cookie to persist your login details.
|
|
|
|
|
Sessions are per PC access, not per Browser access. So if you use a second instance of a browser on the same PC, sessions will ALWAYS be shared.
|
|
|
|
|
ChrisKo wrote: So if you use a second instance of a browser on the same PC, sessions will ALWAYS be shared.
I doubt. AFAIK, session will be shared if the new instance window is the child of instance who have a session, like popup windows etc. If you are taking a new instance by clicking on the browser executable file, I don't think that session will be shared.
|
|
|
|
|
yes, I will go with ChrisKo, Session will be shared between two browser window.
note:
- a new instance of IE will use a different session (from IE): good
- a new tab in IE will use same session (from IE): bad
- a new instance of firefox will use a different session (from IE): good
- a new instance of firefox will use same session state (from firefox): bad.
- a new tab in firexox will use same session state (from firefox): bad
Conclusion: It uses same session state when it is same process !!! => NOT VERY COOL
Amit Agarwal
|
|
|
|
|
Hi guys
Does anyone know how to programmatically add multiple usercontrols to a panel?
I've used LoadControl() method, but it only loads the usercontrol the first time. I wantt to continually add multiple usercontrols to the same panel.
Can anyone help me?
Thanks
|
|
|
|
|
Hi, in this case i am adding an array of LinkButtons in a Multiview control dynamically.
entries[indexIntVar] = new LinkButton();
view1.Controls.Add(entries[indexIntVar]);
Hope this helps!
|
|
|
|
|
You can add n number of user control Dynamically
But why are you adding user controls to Panel ?
There is one more simpler option you can add user controls to Repeater
Use Repeater instead of Panel if you can that will make your life simpler
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hi, as i mention on the title of the post i get those errors coming from
the web.congig file of the web site. I tried removing the references and then
adding them again but still the same problem. Those are:
add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"
add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
Any ideas?
Thanks a lot!
|
|
|
|