|
i need a text box by which user can enter time in hour:Min Formate
Ex 08:24 (Hr:Min)
i mean Text Box Which Allow user to Enter only 2 number Before : and 2 num after :
Raghvendra
|
|
|
|
|
Use regular expression to find value is in expected pattern. If you use this kind of textbox in many forms, I suggest making it as a custom control with all validation logic embedded. You can reuse it by dragging and dropping from toolbox.
|
|
|
|
|
Sir i need A test Box Which shows fromate Like( : )
So user can enter only 2 num Before : and 2 After : ,
so sir how i will make hole custom textbox , i mean could u plz give me some related code for it
Raghvendra
|
|
|
|
|
Member 4659001 wrote: So user can enter only 2 num Before : and 2 After : ,
You can hook JS keypress events of the texbox and check for the pattern. Regular expressions can be used here to check user has entered in the expected format. Here is a good RegEx tutorial, http://www.regular-expressions.info/[^]. Consider getting a good book on ASP.NET and Java Script.
|
|
|
|
|
Sir this time i m very specific, i need to create control , The control provides the dots between the numbers automatically. An example is the IP address control in many Windows networking dialogs, which is a combination of four three-character fields that accept only numbers.
i need same
Raghvendra
|
|
|
|
|
Here is javascript function may help u to solve ur problem...
var cnt=0;
function Format(e)
{
if(e.keyCode <= 57 && e.keyCode >= 48 )
{
var str=new String();
str=document.getElementById("txt").value;
if(str.length<=4)
{
cnt=cnt+1;
if(cnt==2 || str.length==2)
{
var str=document.getElementById("txt").value;
str=str+":";
document.getElementById("txt").value=str;
}
if(document.getElementById("txt").value=='')
cnt=0;
if(cnt>3 && str.length>4)
e.keyCode=0;
}
else
e.keyCode=0;
}
else
e.keyCode=0;
}
|
|
|
|
|
Hi ! All
How to screen sharing over Internet by using destop or webbase application
harun
|
|
|
|
|
Don't repost. This is considered as rude.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
You can use Microsoft SharedView. Here is the link:
SharedView
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
I am using repeater control in my page and repeater control has nested checkboxlist control,on one button click inside same repeater control,i am adding listitems to the checkboxlist control. the listed items add successfully into checkboxlist control.now i am want to get checkboxlist items checked value on another button inside repeater control.
Plse give me sugession on this.
My Handler for checkboxlist is not working.
Dim Cbl_Groupname As CheckBoxList = CType(ri.FindControl("ChkLst_Groupname"), CheckBoxList)
AddHandler Cbl_Groupname.SelectedIndexChanged, AddressOf Me.ChkBoxLsGroupName
I add this handler in repeater control itemcreated event.
|
|
|
|
|
Instead of handler, try ItemCommand event of repeater. Also use CommandArgument and CommandName in combination with this to solve further issues. In the same event, you can find checkbox list by ...
((CheckBoxList)e.Item.FindControl("ControlName"))
puranonnet@hotmail.com
www.ibrinte.com
|
|
|
|
|
Hai all,
i have a wep page and written some code within try catch block.
i have a messagebox(javascript) and i want to show ,if any error occurs in my page
try
catch ex as exception
msgbox(ex.message)
exit sub
end try
but my msgbox is not showing my error,instead it is displaying nothing.
but if i do with response.write in catch block,it is displaying the error.
If i want to show only in messagebox,
how can i display,
r information i am usig vs2003 with sqlserver2000.
It is possible in vs2005 but how to do in vs2003
if any body have idea,plz let me know.
thanks in advance
kissy
|
|
|
|
|
Kissy16 wrote: try
catch ex as exception
msgbox(ex.message)
exit sub
end try
You can not show a message box from code behind, as it is executed on sever.
What you need to do is that if there occurs an error, render the error message to client side and call the javascript function there to show the message box.
Kissy16 wrote: r information i am usig vs2003 with sqlserver2000.
It is possible in vs2005 but how to do in vs2003
Approach will be same for both the versions.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello,
I have a Datalist.and i have taken textbox, radiobutton,fileUpload control as my requirement. I want to Give JavaScript validation on these control. which is in EditItemTemplate of DataList..How to Give javaScript validation?
|
|
|
|
|
hi all,
I wud like to export data from asp.net gridview to pdf format.Can any1 let me know how to go abt it?i tried response.addheader method its not working..is there any other way?
T.Balaji
|
|
|
|
|
Hi,
You could the the techniques in the following article to iterate through the data:
http://www.c-sharpcorner.com/UploadFile/DipalChoksi/exportxl_asp2_dc11032006003657AM/exportxl_asp2_dc.aspx?ArticleID=000c64fb-8a22-414a-8247-984335aaa0eb
And then use the following free library, iTextSharp, to put it into PDF format:
http://itextsharp.sourceforge.net/
This should do the trick for you.
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
how to remove the time part in the date display wen displayed in the datagrid ... when the columns are created during the runtime . the code snippet is
oledb.Open();
OleDbDataAdapter ad =new OleDbDataAdapter("select PTID as [Patient Id] ,PTName as [Patient Name],AppHospId as [Approved Hospital],AppDocId as [Approved Doctor],AppDt as [Approved Date ] from APPT where ICID='"+Ah+"'and UHID Is Null and AppSpecId='"+ SpecId.SelectedItem.Text.ToString()+"'and AppDt>=DateValue('"+F_txt.Text +"') And AppDt<=DateValue('"+T_txt.Text +"')",oledb);
DataTable ds=new DataTable();
ad.Fill(ds);
DataGrid1.DataSource=ds;
DataGrid1.DataBind() ;
DataGrid1.Visible=true;
oledb.Close();
i want the Approved Date column to display only the date not the time part like (12/09/2008) and not as (12/09/2008 12:00 am).. can anyone help me out with this
|
|
|
|
|
You can convert it in the query. Look at the CONVERT function if you are using SQL server.
jaya86 wrote: select PTID as [Patient Id] ,PTName as [Patient Name],AppHospId as [Approved Hospital],AppDocId as [Approved Doctor],AppDt as [Approved Date ] from APPT where ICID='"+Ah+"'and UHID Is Null and AppSpecId='"+ SpecId.SelectedItem.Text.ToString()+"'and AppDt>=DateValue('"+F_txt.Text +"') And AppDt<=DateValue('"+T_txt.Text +"'
Ever heard about SQL Injection?
|
|
|
|
|
hi jeyaraman,
give like this
select convert(varcghar(10),approveddate,103) as appddate from .....
T.Balaji
|
|
|
|
|
sory its varchar--- typing mistake
T.Balaji
|
|
|
|
|
Anybody know of any good tutorials on creating a wysiwyg in an asp.net web page? I've seen alot of stuff on google that you can purchase or download, but I want to create my own just to learn.
|
|
|
|
|
if i am not wrong, there is good article on Codeproject . you can try to find it .
cheers,
Abhijit
Think Sharp | Code Sharp | C Sharp
|
|
|
|
|
Easy way is to download some opensource editors and look at the code. TinyMCE is a good one.
|
|
|
|
|
"The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts."
I've never done this. Can someone tell me how to do this? I'm not sure which readme the message is referring to.
|
|
|
|
|
Hi
I have MV2005 and nhibernate from August 2008.
This is snippet of my code:
ExampleClass.hbm.xml:
<pre>< hibernate-mappi ng xmlns="urn:nhibernate-mapping-2.2" auto-import="true";
<class name="NHibernateExample.ExampleClass, NHibernateExample" table="ExampleClass">
<id name="ExampleClassId" column="ExampleClassId">
<generator class="native" />
</id>
<property name="Text" />
</class>
</pre>
App.conf
<pre><c onfiguration="">
<configsections>
<section>
name="nhibernate"
type="System.Configuration.NameValueSectionHandler, System, />
Version=1.0.5000.0,Culture=neutral, /> PublicKeyToken=b77a5c561934e089" />
</section></configsections>
<nhibernate>
<add>
key="connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"
/>
<add>
key="dialect"
value="NHibernate.Dialect.MsSql2005Dialect"
/>
<add>
key="connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"
/>
<add>
key="connection.connection_string"
value="Server=localhost\SQLExpress;Database=NHibernateExample;Trusted_Connection=Yes;"
/>
</add></add></add></add></nhibernate>
</c></pre>
Main code:
<pre> try
{
Configuration Config = new Configuration();
Config.AddAssembly("NHibernateExample");
ISessionFactory Factory = Config.BuildSessionFactory();
ISession Session = null;
Session = Factory.OpenSession();
ExampleClass ExClass = new ExampleClass();
ExClass.Text = "Test";
Session.Save(ExClass);
Session.Close();
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}</pre>
I don't know what it's wrong. The program is aborting when go to this line: ISessionFactory Factory = Config.BuildSessionFactory();
Exception message is: "Could not find the dialect in the configuration"
I've read several solutions on different forum ( I've added xsd file, loaded additional dll file ) but it still don't working.
Robert&
I
modified on Tuesday, September 9, 2008 5:17 PM
<div class="ForumMod">modified on Tuesday, September 9, 2008 5:25 PM</div>
|
|
|
|