|
Hi,
First of all you create a new web form for your calendar control. That means this new web form will contain only the calendar control and the ok button. Now you modify the source web form to accept a query string named, for example date like this --
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
string dt = Request.QueryString[0].ToString();<br />
txrDate.Text = dt;<br />
}<br />
catch<br />
{<br />
}<br />
}<br />
You can check for post backs according to your program logic.
The code for button which will display the calendar web form will go like this --
private void cmdDate_Click(object sender, System.EventArgs e)<br />
{<br />
Response.Redirect("calendar.aspx?url=webform1.aspx");<br />
}
i have assumed that the calendar control is placed on calendar.aspx and the source web form is webform1.aspx
now its turn of the calendar.aspx web form
write following code in page load event
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
url = Request.QueryString[0];<br />
}<br />
catch<br />
{<br />
}<br />
}
here i have used a string variable named url to store the source url which will be sent to calendar.aspx through query string.
now for the ok button on calendar.aspx write this code --
private void cmdOk_Click(object sender, System.EventArgs e)<br />
{<br />
if(url != "") <br />
{<br />
Response.Redirect(url + "?date=" + Calendar1.SelectedDate.ToShortDateString());<br />
this.Visible=false;<br />
}<br />
<br />
}<br />
here my calendar control name is calendar1
this.visible=false will hide the calendar.aspx page. similarly if you want you can hide and show the source page. But be sure to check the visible property where it is to be set to true where to false.
hope you have understood the code. Its just simple.
Anant Y. Kulkarni
|
|
|
|
|
What you are describing is not possible without Javascript.
|
|
|
|
|
why not javascript???Ok use cookies or cross-page posting
|
|
|
|
|
hello..
i'm thinking of learning to use c++..i just know a little about developing codes..
right now i'm doing something about string..
i'd like to know a way to break a string input to char..i'm quite new to the programming vocabulary so i hope u all know what i mean..
plss help me..
fe8her
|
|
|
|
|
This is quite simple in c#.
just instantiate a new string variable and call the ToCharArray() method on it. This method returns a char[] which you can use for your purpose. I will show you an example-
string temp = "sample string";
char[] temp_array = temp.ToCharArray();
now using various loop statements you can do some processing on the temp_array.
Anant Y. Kulkarni
|
|
|
|
|
You can access characters in a string as if the string was an array of char:
string s = "Orange";<br />
char c = s[2];
You can't modify characters in a string, though, as strings are immutable. For that you would have to create an array using ToCharArray.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I am trying to send mails from my c# windows application. For this i have added reference to the web namespace and am using the SmtpMail class. But when i run the application it gives me an error that Cannot contact the Smtp Server or sometimes it gives an error that the Smtp server not found.
I think my Smtp server may not be configured properly to send mails. Can any body provide guidance on this issue.
My code goes like this -
SmtpMail.SmtpServer = <my pc name>
SmtpMail.Send(from, mailto, subject, body)
The arguments will be taken from text controls on the form and passed in to the variables "from","mailto",etc...
I hope somebody suggests me the solution. I am sure that the code must be working, but the smtp server might be not configured properly.
Anant Y. Kulkarni
|
|
|
|
|
I assume your local SMTP server is not running properly, or it is not configured to wait on the default port. What kind of mail server to you have installed?
If you cannot find the server's manual, try the public SMTP server which you also use with your mailer application (copy the name from your outlook/thunderbird settings).
_________________________________
Please inform me about my English mistakes, as I'm still trying to learn your language!
|
|
|
|
|
hey...
try This..
MailMessage ObjMail = new MailMessage();
ObjMail.Subject = Subject;
ObjMail.From = From;
ObjMail.To = To;
ObjMail.Body = MailContent;
ObjMail.BodyFormat = MailFormat.Html;
SmtpMail.Send(ObjMail);
here Subject,From,To and MailContent all are variables..and u have to specify their values..try with this surly the mail will work
Cheers!!
|
|
|
|
|
thanks for the code but i used the same code and it gave me the following error. If you know something abt it please reply me.
Could not create 'CDO.Message' object.
Anant Y. Kulkarni
|
|
|
|
|
Hi,
may I ask related to this post, how can one save a MailMessage to a file pls? Thanks.
|
|
|
|
|
if you want to save a mail message you can use serialization. just serialize the mail message object to a file and next time deserialize the object to display its contents.
Anant Y. Kulkarni
|
|
|
|
|
Hi,thanks for your reply. I think that a MailMessage object can't be serialized. I'm doing:
Stream s = File.Open("C:\\tempemails\\hello.eml",FileMode.Create);
BinaryFormatter b = new BinaryFormatter();
b.Serialize(s,mailMsg);
s.Close();
where mailMsg is the MailMessage object. Am I doing something wrong or it's because MailMessage object's can't be serailized? Thanks.
|
|
|
|
|
There is discussion on this same topic of serializing mail message class at http://www.csharp-station.com/ShowPost.aspx?PostID=11362[^].Please read it. I think it is too complex.
Otherwise you can manually save a MailMessage object by creating your own format. write a method to read all the necessary properties (you think) must be saved and write it to a file. Next time when you want that saved message just create a temporary mail message object and assign property values from the file. If you want security then just encrypt while you save the object and, ofcourse, decrypt before assigning the properties.
Anant Y. Kulkarni
|
|
|
|
|
i checked the server name property, ie copied it from my email client (Outlook) but now it is giving an error "Could not create 'CDO.Message' object.".
Do you know something about it?
My outlook is working fine with the same server name.
Anant Y. Kulkarni
|
|
|
|
|
Hello
I call FORM elements from another thread. I use Invoke/BeginInvoke for that.
I access a TextBox and a ProgressBar.
Can I use
theForm.InvokeRequired ...
to access both elements or do I have to check if for each element:
textBox.InvokeRequired ...<br />
progressBar.InvokeRequired
Thanks
Martin
|
|
|
|
|
As one can assume that all controls on one Form are created within the same thread you can safely just check the Form.
|
|
|
|
|
Arggg, twice in a row I was only minutes too late
|
|
|
|
|
Only once All the controls would have been created on one thread
|
|
|
|
|
Hi folks ,
i have developed one media player using DirectX.Capture class from codeproject its playing live video's good, but now i got a problem with screen savers it will activated after its time limit so i need to block the screen saver activation. i have working cith c# and windows forms if any one know s plz share with me...........
Thanks & Regards
..ranandbe...
|
|
|
|
|
Search on MSDN about an article on this topic.
|
|
|
|
|
I need to know how to connect with wap by wireless device.
Very urgent.
Can someone help me????
Can i access mail from mobile device????
If anybody know then please send me the source.
Shamsh Tabrij
|
|
|
|
|
Dear
E-Infinity is a leading provider in Software Development solutions with services such as offshore software development India, Web Development India, Enterprise Solutions, Offshore software development, Web-Enablement Designing, Offshore Application development, Multimedia and Design Solutions, Search Engine Optimization Services and Mobile Technology Development in India.
Positions: Senior Software Engineer/Software Engineer
Technical Skills: C#. NET, ASP.NET, SQL Server 2000.
1) 1.5-3 years of relevant experience
2) Good experience in developing Web or Windows based applications
3) Expertise in C#. NET & ASP.NET, COM, DCOM
4) Good working experience in Databases v.i.z. SQL Server! , Oracle.
5) Candidates should have very good analytical & Design skills.
6) Good communication and interpersonal skills are a must.
Educational Qualification: BE / B Tech / MCA / MSC
Please send your resumes to
career@einfy.com immediately
Note: All the positions are based at Hyderabad.
Thanks & regards,
E-Infinity Solutions
8-2-686/DB/19,
Mount View Enclave,
Road No.12,
Banjara Hills,
Hyderabad - 500 034
Tel: +91 405 596 8656
www.einfy.com
Regards
HR Team
E-infinity Solutions
dsfd
|
|
|
|
|
There is in fact a jobs forum. You should post this there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
1.
Any company advertising a job for free on public forums probably isnt worth working for.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|