|
You can use the CompareValidator to validate a date-type value, you can see an old post[^] for more information.
|
|
|
|
|
it is quiet difficult to validate a date in aspx page. one method to validate date is
get the value of textbox and spit each value with '/' character then compare the 3 values. but if u are using any globalization it this validation will not work correctly,.
that is the date format for different countries are different and separation character also differ.
so if u r using any globalization, then get the currentculture first, decide the separator and then split, then compare.
for checking the date format u can use regular expression validator.
coolsweety
|
|
|
|
|
Hello to all,
I want a dialog window on button click and dialog window has datagrid.
Datagrid has hidden column as employee number and second column is employee name which is template column(Linkbutton).
When I click on templete column I want that the selected employee name should be displayed in a listbox which is on parent form.
Please help me.
|
|
|
|
|
Hi
I have an application which sends mail
I use this code
Dim emailText As String
Dim emailMessage As New MailMessage
emailMessage.From = from.Text
emailMessage.Headers.Add("Reply-to", "reply@yahoo.com")
emailMessage.Subject = subject.Text
emailMessage.To = too.Text
emailMessage.BodyFormat = MailFormat.Html
emailText = message.Text
emailMessage.Body = emailText
SmtpMail.SmtpServer = "mydomine"
SmtpMail.Send(emailMessage)
It is working but it is sending the mail to Bulk folder
How can i send to Inbox
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
|
Is it Possible to have 2 header rows(header for header)for a scrolling datagrid with fixed header.Plz Help.
Thanks in advance.
-- modified at 3:10 Thursday 20th April, 2006
|
|
|
|
|
Check out this solution:
http://forums.asp.net/390809/ShowPost.aspx[^]
Here is the C# Equivalent (with some added stuff I did to help those with possible questions):
private void DataGrid1_PreRender(object sender, System.EventArgs e)
{
//This MUST be done in the Pre-Render function. Otherwise will have errors if running this code outside of the PreRender function.
DataGridItem dgItem = new DataGridItem(0,0,ListItemType.Header);
TableCell myCell = new TableCell();
myCell.ColumnSpan = 2; //This Merges Cells together.
myCell.Text = "Test";
myCell.BackColor = Color.Lavender; //Change the back color of a single cell.
myCell.VerticalAlign = VerticalAlign.Middle;//This Centers the text vertically for a single cell.
dgItem.Cells.Add(myCell);
dgItem.HorizontalAlign = HorizontalAlign.Center;//This centers the text for the entire dgItem (which in this case is the additional header we just added).
DataGrid1.Columns[1].HeaderStyle.BackColor = Color.LemonChiffon;//This changes the color for an entire column, not needed, but is neat to see if you were thinking about doing something like this in the future - now you know how to.
DataGrid1.Controls[0].Controls.AddAt(0, dgItem); //Change the integer in the AddAt() function to insert the header somewhere else in the datagrid (like 1 for below the original header, or 5 if for some inexplicable reason you want two totally separated headers with rows of data in between them.
}
Hope you guys liked it! Big Thanks to Jim Ross and his post at forums.ASP.Net website and his source who gave him the original VB code: Anand Hegde (MSFT).
- M
|
|
|
|
|
Hi All,
How to add controls(textbox,dropdownlist and etc)into the webpage in runtime .?
And how to handle the events of these controls?
Just add the control in form not in Panels
Pls give me suggession with sample code.
thanks
paul
Paul
-- modified at 3:08 Thursday 20th April, 2006
|
|
|
|
|
|
Thanks for your sugession.
how to add the control into form..(Not in Panel and placeholder)
-- modified at 4:34 Thursday 20th April, 2006
|
|
|
|
|
nesaraja wrote: how to add the control into form..(Not in Panel and placeholder)
Get reference to the Form control, and add the dynamic control to the form.
then i guess your next question will be "How do I get reference to the Form?" . Ok, here are two ways:
+ With the ASP.NET 2.0, use the Page.Form[^] property.
+ With the ASP.NET 1.x, make sure the form tag has the runat="server" stuff, then you can declare the HtmlForm[^] instance in code-behind, and use it as you would with a normal object.
|
|
|
|
|
What is Event bubling .............
Any on give me example of event bubling whent it accurs
yogesh m
|
|
|
|
|
|
I want to refresh the client's browser, If i know the ip address of the client machine. Please help me..Urgent
-- modified at 2:42 Thursday 20th April, 2006
|
|
|
|
|
Response.Write("")
May be it will work for you
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
|
i have a Dropdownlist2_selectedIndex() function. I have written some code in this function to update some data in the database.When i select the Dropdownlist2 then the code in the Dropdownlist2_selectedIndex() function gets executed twice.Hence the records gets updated twice.For e.g instead of updating it to 5 it updates it to 10.
Plz help me out....It's urgent.
Thanks,
Riz
|
|
|
|
|
You might want to check if the Dropdownlist2_selectedIndex handler is wired up to the event twice?
|
|
|
|
|
Hi @ all
i am searchin in for a while and cant find something about Regex Get Subdomain.
I wanna get this Value: "subxxxxx"
of an url like this : http://subxxxxx.mydomain.com/xxxx.aspx
Someones haves an solution for it?
Thank you for help.
poOkie
|
|
|
|
|
+ No need to use the Regex, simply use the SubString method instead .
+ Below is a quick example with Regex:
public string GetSubDomain(string url)
{
Regex r = new Regex(@"http://(?<SubDomain>[\w]+\/?)\S*", RegexOptions.Compiled);
return r.Match(url).Result("${SubDomain}");
}
|
|
|
|
|
Respected Sir
I have a problem to create Tab Control in asp.net
i have installed visualstudio.net2003 in m machin.
so please help me b providing information or any source code to create tab control
bye
vivek deshpande
|
|
|
|
|
|
Respected Sir
I want to create a popup menu in asp.net.
But I don't have any idea about it.
so please help me to create popup menu.
also how to write event after clicking on menu item.
I have visualstudio.net2003.
So please tell me.
vivek deshpande
|
|
|
|
|
just search for skmMenu.I guess it will help u.
|
|
|
|
|
I have faced the problem while connecting the POP3 Server. Actually the pop3 server is connected but the following error is occured when disconnecting the server.
Data = "QUIT " + CRLF;
szData = System.Text.Encoding.ASCII.GetBytes(Data.ToCharArray());
NetStrm.Write(szData,0,szData.Length);
NetStrm.Close();
Object reference not set to an instance of an object.
Help me.
SR Ranjini
|
|
|
|