|
Thanusree Duth wrote: When project runs,current date will be shown as default in two textboxes
What do you actually want? Change the default values as per your requirement.
|
|
|
|
|
you can set value in text while page load itselt
|
|
|
|
|
Thanusree Duth wrote: urrent date will be shown as default in two textboxes
Setting Current Date in two TextBox
protected void Page_Load(object sender, EventArgs e)
{
string currentDate= DateTime.Now.ToShortDateString();
fromDate.Text = currentDate;
toDate.Text = currentDate;
}
|
|
|
|
|
|
i am working on excel application in which i need to download the data from excel.
while opening excel through application it always popup message as "Connecting to the server for information"
i want to disabled that meassage.
what i need to do..
i tried .DisplayAlerts = false; But its not working
|
|
|
|
|
Your information is not proper. How you are accessing your excel? Are you using any third party Dlls? Have you debugged to see if there is any popup invoked?
Mugdha_Aditya wrote: i tried .DisplayAlerts = false; But its not working
Which object is having this property?
|
|
|
|
|
no i am not using any third party dll
m opening my excel like this
ApplicationClass xlApp = new ApplicationClass();
//xlApp.ShowStartupDialog = false;
//xlApp.DisplayAlerts = false;
Workbook xlWBook = xlApp.Workbooks.Open(sFileName, 0, false, 5, "", "", false,
Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);
every thing working correctly but when i debug my code... n start downloading the data it gives popup as conneting to server to get informtaion...
popup goes automatically..
but i want to hide tht
|
|
|
|
|
I have two calendar extenders.FromDate and ToDate.I have to validate it by using javasript.FromDate wont become greter than ToDate.when fromdate entered is greater than todate,a messagebox will appear..Pls help me
|
|
|
|
|
1. Get values from textboxes using document.getElementById("yourtextboxid1") and document.getElementById("yourtextboxid2")
2. Compare those values and display proper message
|
|
|
|
|
hey... you can use validation control rather than javascript
<asp:Label ID="lblFromDate" runat="server" CssClass="Label-Normal" Text="From Date :"></asp:Label>
<asp:TextBox ID="txtFromDate" runat="server" ReadOnly="true" Width="70px"> </asp:TextBox>
<asp:ImageButton ID="imgFromDt" runat="server" AlternateText="SelectDate" Height="21px"
ImageUrl="~/images/calender.jpg" OnClientClick="return false;" TabIndex="9" />
<asp:Label ID="lblToDate" runat="server" CssClass="Label-Normal" Text="To Date :"></asp:Label>
<asp:TextBox ID="txtToDate" runat="server" ReadOnly="true" Width="70px"> </asp:TextBox>
<asp:ImageButton ID="imgToDt" runat="server" AlternateText="SelectDate" Height="21px"
ImageUrl="~/images/calender.jpg" OnClientClick="return false;" TabIndex="9" />
<asp:CompareValidator ID="valCompEndDate" runat="server" ControlToCompare="txtFromDate"
ControlToValidate="txtToDate" Display="Dynamic" ErrorMessage="From date should not be greater than to date."
Operator="GreaterThanEqual" Type="Date" Style="width: 40%; font-family: Arial;
font-size: 12px;" ValidationGroup="valGrpExpFile"></asp:CompareValidator>
|
|
|
|
|
Its difficult to read your code, format it.
|
|
|
|
|
if (sender._selectedDate > new Date()) {
alert("Please select any day before Today.");
sender._selectedDate = new Date();
sender._textbox.set_Value(sender._selectedDate.format(sender._format));
}
u can use this script and can modify according to ur need.
regards,
amit
|
|
|
|
|
I have a ajax tool calendarExtendarFromDate,imgFromDate,textBoxFromDate,calendarExtendarToDate,imgToDate and textBoxToDate,When a date is selected from calendarExtendarFromDate,that date is displayed in textBoxFromDate.Likewise in the case of calendarExtendarToDate.Here is the source code:
--------------------------------------------------------------
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="selectDate" runat="server" Text="Select Date:">
</asp:Label>
<asp:TextBox ID="txtFromDate" runat="server" ReadOnly="True"></asp:TextBox>
<img id="imgFromDate" runat="server" src="~/images/calendar.png" alt="~/images/calendar.png"/>
<cc1:CalendarExtender ID="CalendarExtenderFromDate" runat="server" CssClass="cal"
TargetControlID="txtFromDate" PopupButtonID="imgFromDate">
</cc1:CalendarExtender>
<asp:TextBox ID="txtToDate" runat="server" ReadOnly="True" Enabled="False"></asp:TextBox>
<img id="imgToDate" runat="server" src="~/images/calendar.png" alt="~/images/calendar.png" />
<cc1:CalendarExtender ID="CalendarExtenderToDate" runat="server" OnClientDateSelectionChanged="CheckForFutureDate" CssClass="cal" TargetControlID="txtToDate"
PopupButtonID="imgToDate">
</cc1:CalendarExtender>
</ContentTemplate>
</asp:UpdatePanel>
-------------------------------------------------------------
I have radiobuttons..When the radiobutton between is clicked,then only calendarExtendarToDate is enabled.otherwise it becomes in disabled state..I wrote code in jscript as below:
function validate()
{
document.getElementById("imgToDate").disabled=false;
document.getElementById("txtToDate").disabled=false;
}
//call this function in .aspx.cs as below:
rbBetween.Attributes.Add("onClick", "return validate()");
textbox is disabled.When between radio is clicked,then only enabled.But calendarextendar disabled didnt work.Pls help me...
|
|
|
|
|
Can you edit this code using <pre></pre> tag. This is not readable.
|
|
|
|
|
Use like this
document.getElementById("<%= imgToDate.ClientID %>").disabled = false;
|
|
|
|
|
We have an application, which it has its own user authentication pages. Also, we have a web services that runs in parallel with the main application. The web services utilizes separate authentication mechanism. So, users of our web service get authenticated then they are redirected to the web services. This all works fine.
In most cases, all of our clients implement their own code to talk to our web services. Recently, we had a client who requested us we develop the mechanism for them. All of our testes passed in the test environment. In the test environment the web service and the authentication mechanism live in separate servers, so a client first authenticates with server A then we redirects them to server B. This has been working fine for number of years.
User authenticates using https:
then we redirect them to https:
When we moved to production the piece of code we developed, we decided to put both applications in the same server, and I was surprized to how Response.Redirect and IIS work.
User authenticates using https:
then we redirect them to https:
In the second case, the redirect is sent to the client as relative url /app1/letmein.aspx?iguid=xyz even though we are setting the full absolute URL in the redirect. I have checked the returned pages headers using Fiddler and it shows relative url, not absolute as I was expecting them.
I googled for some hint and found out that I need to set useFullyQualifiedRedirectUrl="true" in the config file. But that does not seem to make a difference.
So, Is there a way to tell the app or IIS to send full absolute URL? How do I achieve that.
|
|
|
|
|
|
Interesting, will give it a shot.
|
|
|
|
|
Hi,
i am using asp.net. in my html tag, is taking well but tag is not taking. So wondering what else is my option to make the two words distinct ? any equivalent methods ??
suchita
|
|
|
|
|
WHat does your tag looks like? try to post complete question, so it is easier to understand and help ya!
|
|
|
|
|
ya sure. My code is something like this:
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Category") %><%# DataBinder.Eval(Container.DataItem,"Item")%>
</ItemTemplate>
now if the Category and Item has values Furniture and table respectively, my output is like this:
Furnituretable
But I am trying to show like this:
Furniture table
so i put tag between these databinders.
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Category") %></t><%# DataBinder.Eval(Container.DataItem,"Item")%>
</ItemTemplate>
But still my output is:
Furnituretable
suchita
|
|
|
|
|
SayamiSuchi wrote: <itemtemplate>
<%# DataBinder.Eval(Container.DataItem, "Category") %><%# DataBinder.Eval(Container.DataItem,"Item")%>
well /t is not valid HTML tag.
use instead.
|
|
|
|
|
Yup its worked. Thank you very much Yusuf.
suchita
|
|
|
|
|
SayamiSuchi wrote: <itemtemplate> <%# DataBinder.Eval(Container.DataItem, "Category") %><%# DataBinder.Eval(Container.DataItem,"Item")%>
align content with table or div
<ItemTemplate>
<table>
<tr>
<td><%# DataBinder.Eval(Container.DataItem, "Category") %></td>
<td> </td>
<td><%# DataBinder.Eval(Container.DataItem,"Item")%></td>
</tr>
</table>
</ItemTemplate>
[edit] sorry for late post. connection disconnected [/edit]
|
|
|
|
|
Thank you Makhaai. Problem is solved.
suchita
|
|
|
|