|
Hi dears,
Im looking for an asp.net Calendar ( not a .dll) source code in C# (or vb)
Do you have any idea to find it ?
thx,
.
www.behzadi.net
|
|
|
|
|
hi,
This code is to select a date from a calendar control.
I hope so it might be use for ur need.
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
string ddate;
DateTime aDate = Calendar1.SelectedDate;
ddate = aDate.DayOfWeek.ToString();
string todate = aDate.ToShortDateString();
Response.Write(todate);
}
Hara
|
|
|
|
|
I looked for an asp.net calendar control source code , not codes to how get date from a calendar ....
www.behzadi.net
|
|
|
|
|
why do u want code when u have calendra contrl there in asp.net.
U can make a aspx page and put a calendra on it and open this aspx page using javascript whereever u want.
Bajrang Singh
Using .net 2.0 (VS2005)
|
|
|
|
|
I need source code to change somethings. I want to create a calendar with Shamsi(persian) date format, so I have to make some changes in calendar source code....
www.behzadi.net
|
|
|
|
|
Hi
Is their any other way to get the value from the TextBox except the one "TextBox.Text".
I am looking in to an article, in that I saw.....
TextBox.Attributes.Add("value","Hello");
Can we assign values in this manner to any TextBox ,Lable to TextBox etc
Thank u
Chandu
|
|
|
|
|
chand10 wrote: extBox.Attributes.Add("value","Hello");
Can we assign values in this manner to any TextBox
Yes.
Apurva Kaushal
|
|
|
|
|
Hi chand
gud question...
it is useful for all ....
thanq
naresh.s.s
|
|
|
|
|
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
|
|
|
|