|
I wanted to avoid using session vars, but I guess that is my only option at the moment. Thanks!
|
|
|
|
|
Just one more tip for you.
Create a static class to hold all your session objects. For example
public static class SessionItems
{
public static YourObjectType YourObject
{
get
{
Object result = HttpContext.Current.Session["YourObject"];
if (result == null)
return null;
else
return (YourObjectType)result;
}
set { HttpContext.Current.Session["YourObject"] = value; }
}
}
It makes it easier to manager your session objects this way, plus it prevents bugs from trying to access a session object that does not exist. Also prevents bugs that can occur from mispellings
I didn't get any requirements for the signature
|
|
|
|
|
Dear All,
I have a requirement that i want to send mail to all my user registered on my site in last 24 hours.
Manually its working fine but i dont want that a operator has to sit and search data then click on some button to send the mail. I want that by using some automated process that server automattically send the mail at the desire time.
Plz do reply what could be the possible conditions.
Thanks and Regards
|
|
|
|
|
Create an application that reads your database of registered users, selecting those users that have registered on the current day and generate your email. Sounds pretty straight forward, right ?
Are you familiar with a programming language such as VB.net or C#.net ?
Are you capturing the registered user with a date stamp of when they registered ?
Once the application is written, you could simply schedule it to run each night at 23:59 (just before midnight) to generate the emails.
|
|
|
|
|
Thanks for the reply. You means to say their is way to implement this is a desktop application which is shudule to be run on specific time.
or I want to run one more thing is their is any way to create the utility in web application it self.
Thanks
|
|
|
|
|
My initial vision was to develop a "console application" which would be scheduled to run at a particular time. A console application is a Windows application that has no GUI, it looks like an old DOS program, just a black and white DOS box. The reason for this is that it is fairly easy to develop and test. Once this applcation is written, you could schedule it to run on your web server nightly.
I'm not sure how you would create a Web Application that would send these emails without some type of user intervention. You could create a simple web page that selects all of the newly registered users and when the operator clicks on a button the emails are generated and sent. I don't see how this could be scheduled to run automatically.
I am by no means an expert in web development.
|
|
|
|
|
I presume you are implementing website using asp.net/c# on the Microsoft platform:
First assure the IIS your website resided in have installed SMTP Virtual Server and some necessary configuration is well done.
Second when a new user registers into your website successfully, you can trigger a mailing event.
|
|
|
|
|
Hi!
I have a small upload site that I have built but one thing I can't work out is how to check to see if the file path has already been used.
When I upload just now I create a website address which is saved in doc_url within my table. What I want to check is that when uploading a new file, there isnt already an identical url created within doc_url.
If there is already a file within the database with the same path then I want to throw up an error message so the user knows there is already a file saved at this location with the same name.
I'm using VS2005, C#, ASP.net
Thanks for your help in advance.
|
|
|
|
|
add a random numder like doc_url_randomNumber.
Prince
Team Lead
Quest Solutions
www.imaginethinkact.com
|
|
|
|
|
But that means there are two files the exact same within the database, what I want is to have only 1 version of the url which means, one version of the file I have uploaded.
To explain a bit more, when I upload a file e.g. example.gif to a folder I automatically create a url e.g. http://localhost/folder1/example.gif
Now, if I upload a file with the exact same name to the exact same folder I want a message to be displayed saying, there is already a file with this name in this folder.
|
|
|
|
|
Just loop through that folder and compare the file names with your new filename. upload only when result is "no match found".
Prince
Team Lead
Quest Solutions
www.imaginethinkact.com
|
|
|
|
|
Very simple! You can handle that as below:
string filePath = Server.MapPath("~/folder1/example.gif");
if (File.Exists(filePath))
{
//show a message to the user
}
|
|
|
|
|
How would I loop through a database to check all entries in a single column before submitting?
Sorry if these are easy questions, still learning .Net but everything I learn gets stored in a safe place for future reference
Thanks for your continued help!
|
|
|
|
|
|
ViewStateUserKey = Session.SessionID.ToString();
Prince
Team Lead
Quest Solutions
www.imaginethinkact.com
|
|
|
|
|
Hmmm, I tried that but I still receive the same error message when I postback? The session.sessionID.ToString() produces a different value each time I postback...thus displaying the same error message.
|
|
|
|
|
Hi
I have a stored procedure that takes an XML as a parameter. The problem is that anyone could call it passing in any XML. How do i write the stored procedure so that the XML that it takes in as a parameter is based on a specific schema?
Thanks
Neil
|
|
|
|
|
you are not a new member here. What's up with the cross posting?
|
|
|
|
|
Hi All,
How can i take the dynamically created control id from client side??
Note:
dim txt as new textbox
dim plcholder as new placeholder
plcholder.control.add(txt)
now i can create dynamically text box sucessfully, But i want to take this id from Client side like as below
var txtid = document.getelementID("<%=txt.ClientID >") is it possible? or else any other way to take this id?? if anyone knows plz answer me........
kannak
|
|
|
|
|
Request.Form["ctl00$plcholder$txt"]
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
or you can also use <%= textboxid.ClientID %>
Government Dyal Singh College Lahore.
|
|
|
|
|
Hi,
Its working fine,, Thanks you...
but i used to take textbox id like
document.getelementID(ctl00$plcholder$txt)
working packka....
kannak
|
|
|
|
|
hi,
I have a user web control(MyControl.ascx) which includes an asp label:
<asp:label id="lbl" runat="server" text="Label" onclick="javascript:change()" xmlns:asp="#unknown">
change() is a javascript function which is supposed to change the label's backColor
I add this contorl(MyControl.ascx) to an aspx page 4 times, and when I click on any of the 4 labels I get only the fourth labled changed
anybody has any idea what the problem can be ?
|
|
|
|
|
Can you post the change() function?
Without seeing it I'd suggest changing the method signature to
function change(obj)
{
obj.style.background-Color = 'Red';
}
and change the onclick event to "javascript: change(this)".
Without knowing exactly what your change function is doing I can't be sure if this will work tho.
|
|
|
|
|
function change()
{
document.getElementById("<%=lbl.ClientID %>").style.backgroundCOlor = 'red';
}
|
|
|
|