|
You wrongly have replied to my message inspite of chand's.
Apurva Kaushal
|
|
|
|
|
Sorry ...
I didnt watch it clearly ...
anyways
Bye ...
Have a nice day
naresh.s.s
|
|
|
|
|
nareshss wrote: Bye ...
Have a nice day
You too...
Apurva Kaushal
|
|
|
|
|
That can be used for the html controls not server controls.
Reg,
Prema
|
|
|
|
|
Hi,
In web.config file under <appSetting>, i have:
<add key="DisplayDateFormat" value = "MM/dd/yyyy" />
I have a javascript function:
function ValidateForm(strVal)
{
if(web.config's DisplayDateFormat="MM/dd/yyyy")
if (isDate(strVal)==false)
{
return false
}
else
{
//do something
}
return true
}
So how to get the DisplayDateFormat from web.config file in my javascript function?
Could anyone please help me out here?
Thanks,
Dee
|
|
|
|
|
One work around can be to assign the value in a hidden field and then use it in your javascript function.
Apurva Kaushal
|
|
|
|
|
i tried that...i kept it in an asp literal:
<asp:Literal id="literalFormat" runat="server" Text ="<%$ AppSettings : DisplayDateFormat %>"></asp:Literal>
then in javascript function,
var formatString = literalFormat.value;
but this throws error saying that "literalFormat.value is undefined"...but on screen u can see the literal value which is coming from web.config file.
I tried using textbox also..still same prob...
could u tell me why that error message comes?
|
|
|
|
|
Use Hidden field.
Apurva Kaushal
|
|
|
|
|
i did that too...
<input type="hidden" id="txthidden" runat="server" value="<%$ AppSettings : DisplayDateFormat %>" />
still it says that txthidden is undefined
wot to do...could u help me out?
|
|
|
|
|
Try like this:
<asp:hidden runat="server" id="txthidden" value=<%= Configuration.ConfigurationSettings.AppSettings["DisplayDateFormat"]%>
Apurva Kaushal
|
|
|
|
|
hi Apurva,
i get the following error:
Literal expressions like '<%$ Configuration.ConfigurationSettings.AppSettings["DisplayDateFormat"]%>' are not allowed. Use <asp:Literal runat="server" Text="<%$ Configuration.ConfigurationSettings.AppSettings["DisplayDateFormat"]%>" /> instead.
|
|
|
|
|
Have you put that value part in single quotes if so then remove it and then try.
Apurva Kaushal
|
|
|
|
|
no i haven't...
its:
<asp:HiddenField id="txthidden" runat="server" Value="<%$ Configuration.ConfigurationSettings.AppSettings["DisplayDateFormat"]%>" />
|
|
|
|
|
Remove double quotes.
<blockquote class="FQ"><div class="FQA">deep7 wrote:</div><asp:HiddenField id="txthidden" runat="server" Value="<%$ Configuration.ConfigurationSettings.AppSettings["DisplayDateFormat"]%>" /></blockquote>
<asp:HiddenField id="txthidden" runat="server" Value=<%$ Configuration.ConfigurationSettings.AppSettings["DisplayDateFormat"]%> />
Apurva Kaushal
|
|
|
|
|
You may try from the code behind also (C#.net)
string dateFormat=ConfigurationManager.AppSettings["DisplayDateFormat"];
txthidden.Value=dateFormat;
deep7 wrote: value="<%$ AppSettings : DisplayDateFormat %>"
Also You may try with single quotes, instead of double quotes.
Regards,
Jay
|
|
|
|
|
on runtime ie when u take document.getElementById('txtName')
the value of txtName will be different, thats why you are getting a undefined error.
take viewsource and find out the value of the hidden field first and then give that name.
it will be somethinglike
ctl00$MainContent$txtDateSearch
Biju S
|
|
|
|
|
I have just started using VS 2005 and asp.net 2.0. I have put a control on a web form and want to position it on the form. In VS 2003 you could choose either flow layout or grid layout. I want to have the same as flow layout on my form so I can move the control freely.
Anyone know how to do this?
Thanks,
macca
|
|
|
|
|
Hi...
You can do like this ....
Click on " Layout " in the top of ur IDE's menu bar , after that "Postion "
n set " auto postion options " to absolute
then u can drap the control easily....
Naresh.s.s
|
|
|
|
|
Thanks very much Naresh.
That worked a treat.
macca
|
|
|
|
|
Hi Friends
I created login page like username,password
how can i created "Remember me on computer" with check box using cookies
can u help me??
regards
saravanan
|
|
|
|
|
Don't Repost. I have answered you in the Morning itself.
Regards,
Satips.
|
|
|
|
|
hi saptis
i have working in asp 1.1
u gave me the link asp 2.0
i tried not get answes
|
|
|
|
|
Why you create the new thread you should continue in that thread itself means it will be good.
Regards,
Satips.
|
|
|
|
|
k thanks
do u have any good link in asp 1.1 about this
|
|
|
|
|
To store
HttpCookie objCookie = new HttpCookie("UserInfo");<br />
objCookie.Values.Add("UserName",LoginName.Text );<br />
objCookie.Values.Add("Password",LoginPassword.Text);<br />
objCookie.Expires = DateTime.Now.AddDays(1);
<br />
Response.Cookies.Clear();<br />
Response.Cookies.Add(objCookie);
To retrieve
if(Request.Cookies["UserInfo"]!=null)<br />
{<br />
LoginName.Text = Request.Cookies["UserInfo"]["UserName"].ToString(); <br />
LoginPassword.Attributes.Add("value",Request.Cookies["UserInfo"]["Password"].ToString());<br />
}
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|