|
Here two(there may be some more also) ways are there which you can opt for:
1. either you use a javascript calender(for the user to enter the date) or you can even use dropdownlist control for the user to select the date.
2. If user has to enter the specifically in a textbox then enforce to enter in a particular format.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Apurva,
Thanks for your reply.
Presently we have have text box for date fields and users are habitual for this, I think we can't change to drop down box.
Best Regards,
S Kumar
|
|
|
|
|
In that case I feared you have to go for the enforcement for the format of the date i.e ask the user to enter the date in a particular format.
Best Regards,
Apurva Kaushal
|
|
|
|
|
How can I create a CAPTCHA imagte in ASP without using any Service like www.CAPTCHA.net?
Arghya Mahapatra
|
|
|
|
|
|
Hi
I have a simple masterpage setup going. With a default "form1" form in the masterpage and a "hdnProvinceHTML" HTML hidden input control in one of the content pages.
The same content page has a block of JavaScript that needs to access the value of the hidden control.
alert(form1.hdnProvinceHTML.value) tells me that the controls are undefined.
If I look at the source of the running page I see that .Net has changed the names of my controls, and calling
alert(document.aspnetForm.ctl00$mainContentPlaceHolder$hdnProvinceHTML.value);
works.
Is there a way around this? What are the odds that .Net will always asign those names to the controls? And why is this happening in the first place?
Thanks a lot for any help...
|
|
|
|
|
Amos_Keeto wrote: What are the odds that .Net will always asign those names to the cont
Those names represent the control in the hierarchy of controls. Meaning the controls inside which your control is present. The odds that the name will be the same depending on the control mostly. It is not good practice to hardcode the names into the javascript. What you could do is register a call to the javascript function from codebehind.
You can get the full name of the control that will be registered in the page, by calling controlname.ClientID . So you could register in your codebehind something like
RegisterClientScriptBlock("genericname","alert(" + hdnProvinceHTML.ClientID +");")
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Thanks, I'll certainly give it a try...
But ofcourse I have been yanked from that project to "quickly have a look at and fix a bug" in another project, so I don't know when I'll get around to it... grrr
|
|
|
|
|
Well, the idea is that you can get the ID that is generated in the browser by calling the controlname.ClientID method. From there you can call a javascript function passing the name as a parameter, and get a javascript refernce for the control with getElementById('clientsidename') that return the object. You can perform any operations on it from that point on.
Good luck with bugfixing.
regards,
Mircea
Many people spend their life going to sleep when they’re not sleepy and waking up while they still are.
|
|
|
|
|
Hi all,
I have installed VS.net 1.1 on a machine running Windows XP. Whenever I create a new web application it always throw error - Access to the path "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files\webapplication2\37f71cbe\939c5907" is denied.
I have also excluded "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files" folder from indexing services but same problem continues. When I go in folder "c:\windows\microsoft.net\framework\v1.1.4322\Temporary ASP.NET Files" there is no other folder or file except Bind Logs which is also empty.
Waiting for your valuable ideas.
Thanks
God help those who help others
Varun
|
|
|
|
|
|
I want to merge or Append mulitple Tiffs into one Tiff.
Can you suggest some way out for this.
Actually I finds lot of things on Internet, But they are selling whole
package of Imaging. I just want one assembly from third party tool
to get it Done.
kartik rathi
|
|
|
|
|
i've to implement a dynamic javascript menu.the menu is a top menu.it should be dynamic in the sense that it would contain links depending on the type of user like administrator,reader,contributor,guest etc.can anyone suggest me how to implement such a menu.
AMIT TATA CMC
|
|
|
|
|
|
Hi,
I have a dategrid were i have a link button for delete.
In the item data bound i am adding an onclick atribute for the link button to popup the msgbox. In Item command I am writing the logic for delete..
the columns in the grid are dynamically created from the codebehind and not in the design part...
My problem is when I click the delete link I am geting the msgbox..If I click ok the page is not posted back to the server and the row is also not deleted...
in Item data bound the code is :
((LinkButton)e.Item.Cells[9].Controls[0]).Attributes.Add("onclick","javascript:return ConfirmDelete();");
the javascript added in the .aspx part is :
function ConfirmDelete()
{
if(confirm('Do You Want to Delete?'))
{
return true;
}
return false;
}
Regards,
Sivaprasad
|
|
|
|
|
The code seems to correct to me. I think the page should get postback.
Best Regards,
Apurva Kaushal
|
|
|
|
|
Hi Members,
I got one requirements from my client.
We have functionality to send the mail from various formats.
My client gave the various structure of email content. So we can use this structure to send the mail from those templates and some of value from SQL Server DB Tables.
So I like to send the mail message from XML Document Message, so that client can change the message content at times as it requires.
So how can I precede the Email Template using XML in ASP.NET 2.0 using C#.
Can you any one helps me with sample code?
With Regards
Sundar
B.Sundarapandian
|
|
|
|
|
Hi,
I have created template according to our client req.
<template>
I hope this will help........
Regards,
Nagraj
|
|
|
|
|
Hi guys,
can anyone help me with this,
I need to browse the folders ,the sub folders of a directory on a machine and find all the pdf files.
Thanx
|
|
|
|
|
This works in C#, should work in ASP.NET in the machine also.
using System.IO;<br />
<br />
FileInfo[] FI = new DirectoryInfo(strDir).GetFiles("*.pdf", SearchOption.AllDirectories);
This will search in the sub dirs also.
good-luck.
NaNg.
|
|
|
|
|
Hi,
you can use the DirectoryInfo and FileInfo classes for this. Use for each statements to iterate through Files collection of DirectoryInfo class and also apply the same logic for each directory under the main directory.
This would definetly do the trick ( i think )
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
1. I'm looking for a way to detect from where the surfer is from.
I know google has such a thing and they can tell me from what country, region and even city I live in.
I know that in C# it something with colture.
How can I do it in ASP.NET?
2. I have an ASP.NET page, that opens a new ASP.NET page with a js cmd (window.open()).
How can I refresh the first page, when the second one closes? do I need to use a different cmd?
|
|
|
|
|
Hi,
NaNg15241 wrote: 1. I'm looking for a way to detect from where the surfer is from.
I know google has such a thing and they can tell me from what country, region and even city I live in.
You can easily get the IP of the "surfer". From this IP you can get the location of the client.
Try reading the link below. Here are some tips.
http://www.private.org.il/IP2geo.html
Hope i am clear
<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
here my problem is i need to display records of next,previous.if i click previous it should show upto first record like that.
using datagrid and repeater or anything else
kissy
|
|
|
|
|
You need to store the data in the dataset and just have to navigate the recordset according to the navigation button clicks.
Best Regards,
Apurva Kaushal
|
|
|
|