|
thanks brij for reply,
yes it was posted before but iam not able to figure out the error thatswhy posted again .
please suggest me where iam doing mistake
regards
Rameez
|
|
|
|
|
hi folks,
I wud like to display running time in my page using javascript.For that i ve used the following client side function.
<form name="counter"><input type="text" size="8"
name="d2"></form>
<script type="text/javascript">
var milisec=0
var seconds=120
// document.counter.d2.value=0
function display()
{
if (milisec<=0){
milisec=9
seconds-=1
}
if (seconds<=-1)
{
milisec=0
seconds+=1
}
else
milisec-=1
document.counter.d2.value=seconds+"."+milisec
setTimeout("display()",1000)
}
display()
ive hardcoded it as 120 seconds.But i need to pass a value from code behind dynamically and make the timer run for that value.
for e.g i want to pass as display(180) and run the timer.Is there any way of achieving this?Thanx in advance
T.Balaji
|
|
|
|
|
Use RegisterClientVariable
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
can u send me the code?
T.Balaji
|
|
|
|
|
At Server Side:
ClientScript.RegisterHiddenField("someHiddenField", "120");
At Client Side:
var someValue = document.getElementById("someHiddenField");
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
We are new to Nhiberanate concept, We had downloaded the NHibernate sample form CodeProject site using http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx. We had executed this sample it is working fine, but when we are tring add our form in an application it doesn't not display any record. Following is our code.
Table signature
CREATE TABLE [dbo].[TBL_EMPLOYEE](
[EMP_CODE] [int] IDENTITY(1,1) NOT NULL,
[EMP_NAME] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EMP_DEPTNAME] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EMP_EMAILID] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[EMP_PASSWORD] [varchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
CONSTRAINT [PK_TBL_EMPLOYEE_1] PRIMARY KEY CLUSTERED
(
[EMP_CODE] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
hbm.xml file
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="BasicSample.Core.Domain.Employee,BasicSample.Core" table="TBL_EMPLOYEE" lazy="false">
<id name="EMP_CODE" column="EMP_CODE" unsaved-value="0">
<generator class="identity"/>
</id>
<property name="EMP_NAME" column="EMP_NAME" type="String"/>
<property name="EMP_DEPTNAME" column="EMP_DEPTNAME" type="String"/>
<property name="EMP_EMAILID" column="EMP_EMAILID" type="String"/>
<property name="EMP_PASSWORD" column="EMP_PASSWORD" type="String"/>
</class>
</hibernate-mapping>
.class file
using System;
using System.Collections.Generic;
using BasicSample.Core.Utils;
namespace BasicSample.Core.Domain
{
public class Employee:DomainObject<string>
{
private Employee()
{ }
public Employee(string EmpName)
{
EMP_NAME = EmpName;
}
//private variable
// private int _Code="";
private string _Name = "";
private string _DeptName = "";
private string _EmailId = "";
private string _Password = "";
//public string EMP_CODE
//{
// get { return _Code; }
// set { _Code = value; }
//}
public string EMP_NAME
{
get { return _Name; }
set { _Name = value; }
}
public string EMP_DEPTNAME
{
get { return _DeptName; }
set { _DeptName = value; }
}
public string EMP_EMAILID
{
get { return _EmailId; }
set { _EmailId = value; }
}
public string EMP_PASSWORD
{
get { return _Password; }
set { _Password = value; }
}
public override int GetHashCode()
{
return (GetType().FullName + "|" + EMP_NAME + "|" + EMP_DEPTNAME).GetHashCode();
//throw new Exception("The method or operation is not implemented.");
}
}
}
aboce are the files we were using but after broswing the apge it show nothing. Where is the problem we are not able to identify?
poonam
|
|
|
|
|
The article which you shown has a discussion board attached. Chances are more to get help if you use that.
|
|
|
|
|
Hi all
Im using VS 2003 for small web application i have a problem when im using fileuploader,i have some mandatory fields and im using labels for check the requried fields,when i click the submit button my file Uploader path is clear when mandatory field is left, i want to avoid the clear the path of file uploader when that kind situation pls help me to do this,
Thanks,
|
|
|
|
|
This is not possible. You can't write to FileUpload control.
|
|
|
|
|
There is some problem in validation because if any field which is mandatory left blank then it should not make server trip and when you click on submit it will take server trip so at that time path clear is very obvious.
So make sure about validations.
Reasons are not Important but Results are Important.
Swati Tripathi
|
|
|
|
|
|
You can Use RequiredFieldValidator of Ajax Which will popup an error message on lostFocus of that control.
try if not getting then reply.
Darshana Pathak
|
|
|
|
|
Hi friends.
I want to bind data by alphabets order.
Like this
A-G H-O P-V W-Z
abc hic per wwl
adc isk qrs wll
bsc jksl rjk xxs
ckl kal snn xvf
dik lmm tnn xgh
elk mdn unv ynf
fis nop vlls ygn
ghs ols vll zla
Start with A to G in one column,H to O second,P to V in third and W to Z in forth in DataList
please don't forget to vote on the post that helped you.
|
|
|
|
|
from where you are getting your data
The Developer - CEH
|
|
|
|
|
The Developer wrote: from where you are getting your data
From Sql Server database.
please don't forget to vote on the post that helped you.
|
|
|
|
|
use Order by Col1 asc,col2 asc,col3 asc ... etc
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
|
|
|
|
|
Blue_Boy wrote: use Order by Col1 asc,col2 asc,col3 asc ... etc
I have only two field in DataBase Table
One is ID and Second one is Title.
Now,I want to bind title by Alphabets as I posted.
please don't forget to vote on the post that helped you.
|
|
|
|
|
use a loop to read data and then add each read data to the column u want to add to by alph.
The Developer - CEH
|
|
|
|
|
I got solution
My Sql Query Looks like this
select Title from tblLegalPracticeArea where title between 'a%' and 'h%'
..............
please don't forget to vote on the post that helped you.
|
|
|
|
|
you can use datalist.RepeatColumns to make a column into multiple and RepeatDirection which you can specify as vertical or horizontal.
|
|
|
|
|
Baran M wrote: you can use datalist.RepeatColumns to make a column into multiple and RepeatDirection which you can specify as vertical or horizontal.
I know that but we can not bind column by alphabets as I wanted.
Anyways,I have already done it
please don't forget to vote on the post that helped you.
|
|
|
|
|
I have a content page and two Master pages . Based on some condition I want to call one Master to the content page . For example C1 is a content page , M1 and M2 are two master pages based on some condition in C1(atloading of C1) page I want M1 or M2 to be called in C1 programmatically.
anyone please Help me out
Thanks in Advance
Kovuru Sreedhar
|
|
|
|
|
You can set the masterpage of any page at runtime in pre_init event like
protected void Page_PreInit(object sender, EventArgs e)
{
if (Request.Params[A1] != null)
{
this.MasterPageFile = "~/MasterPages/A1.master";
}
else if (Request.Params[A2] != null)
{
this.MasterPageFile = "~/MasterPages/A2.master";
}
else if (Request.Params[A#] != null)
{
this.MasterPageFile = "~/MasterPages/A3.master";
}
}
Cheers!!
Brij
|
|
|
|
|
hello friends
i am newly person for Asp.net..i want to do the Microsoft Certified Professional in Asp.Net ,C#. if any body having dump plz provide and help me
Thanks
Ramesh.S
|
|
|
|
|
Ram_Bytes wrote: if any body having dump plz provide and help me
what is dump. what are you looking for
The Developer - CEH
|
|
|
|