|
Add target="_blank" in the form tag.
---
single minded; short sighted; long gone;
|
|
|
|
|
|
I have sub menu's and even if i click on submenu's it should be redirected to some other website, which should be opened in seperate window.
Thank you
|
|
|
|
|
A "submenu" is something specific to your implementation, so that doesn't tell me what it is. What makes your items that are submenus different from those that aren't?
---
single minded; short sighted; long gone;
|
|
|
|
|
hello everyone
I am using a jscript calender for pick up multi dates in text box.
my text box value is such as 27-02-2007,23-08-2007
now I split that dates in to a array
now i want to convert the above date in format mm/dd/yyyy
give me some suggestion.
thanks in advance
Deepak
Smile a Lots,Its Costs Nothing
|
|
|
|
|
Well, it seems to me that yuo need to modify your javascript calendar to use US dates. Not sure what else you're looking for, really...
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Try this:
var arr_date = strDate.split('-');
if (arr_date.length != 3)
{
}
else
{
if(arr_date[0]>=1 && arr_date[0]<=9)
arr_date[0] = 0 + arr_date[0];
if(arr_date[1]>=1 && arr_date[1]<=9)
arr_date[1] = 0 + arr_date[1];
}
strDate = arr_date[0]+'/'+arr_date[1]+'/'+arr_date[2];
This code is to convert the date in and month in 2 digits ie: if ur date is 2/3/2007 then it will convert to 02/03/2007.
Put alerts and make changes to array index.
Hope this helps u...
|
|
|
|
|
In my application if session is expired then application redirects to login page...
if the user enters the correct credential then the previous page(the page during session timeout) should be displayed . is it possible..............
|
|
|
|
|
The URL of the originally requested file is stored in the ReturnURL key of the query string. Add the following in the Login page after authenticating the user.
If Not Request.QueryString("ReturnURL") Is Nothing Then
Response.Redirect(Request.QueryString("ReturnURL"))
End If
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
In my asp.net web application I used two textboxes for date1 and date2 to search records
I have used two variable in my stored procedure
@OrderDate1 datetime,
@OrderDate2 datetime,
for todays record (values for date1 and Date2)
set @OrderDate1='09/20/2007 12:00 AM';
set @OrderDate2='09/20/2007 11:59 PM';
for records between (values for date1 and Date2)
set @OrderDate1='09/20/2007 12:00 AM';
set @OrderDate2='09/24/2007 11:59 PM';
I have to search the todays records OR records between these two days
(OrderDate >= @OrderDate1 ) AND (OrderDate <= @OrderDate2)
It works fine in my local server>>It finds the todays records by ginving same date (@OrderDate1 and @OrderDate2) and records between two dates
but it does not work for sql server which is outside india ...if it is problem of date format how i can solve that..
Thanks
swapnil ekhe
|
|
|
|
|
If you're using a datetime, it should be fine. Why is your code setting the datetimes in the SQL, should they not come from the code ?
Have you checked the actual data to see that it's as you expect ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All,
I am assign a value to hidden textbox in Javascript something like this:
document.getElementById("<%=htxtQueryStringValues.ClientID%>").value = "XYZ";
and then I say
window.location.reload();
But my value in the hidden textbox is blank always. How do i keep the value XYZ in that textbox whether the page is reload or not.
Please help me....
Thanks in advance...
|
|
|
|
|
ASP.NET 2.0 wrote: window.location.reload();
This is not a postback. It reloads the page, and your data is lost. You need to do a postback to retain viewstate. Calling click on a button that does a postback is one way to do this, but you can also do some research and call the postback method directly ( I don't know what it's called )
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for the reply sir.
My problem is that I have Ajax TabContainer on my User Control Form and all the TabPanel are generated at runtime and so depending upon the tab selection I have to display some data from database. OnClientActiveTabChanged Event I capture which tab is selected and accordingly display that data.
But in javascript I save the selected tab value in the hidden textbox but when I say wind.location.reload my textbox value is blank.
Can u please tell me what might be the problem or is there any other way I can do the same task..
Thanks again...
|
|
|
|
|
ASP.NET 2.0 wrote: window.location.reload();
This will reload the entire page. So no data will be persisted. Try passing querystring values to the page and assign that again to the textbox. May be something like
window.location.href='yourpage.aspx?value=";
Then in textbox
document.getElementById("<%=htxtQueryStringValues.ClientID%>").value = "<%=Request.QueryString["value"]%>";
Hope this helps
|
|
|
|
|
Thanks for the reply Navaneeth.
My problem is that I have Ajax TabContainer on my User Control Form and all the TabPanel are generated at runtime and so depending upon the tab selection I have to display some data from database. OnClientActiveTabChanged Event I capture which tab is selected and accordingly display that data.
But in javascript I save the selected tab value in the hidden textbox but when I say wind.location.reload my textbox value is blank.
Can u please tell me what might be the problem or is there any other way I can do the same task..
Thanks again...
|
|
|
|
|
ASP.NET 2.0 wrote: Can u please tell me what might be the problem or is there any other way I can do the same task..
We've both given you accurate answers, I'm not really sure what else to say.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sir my project understand only usercontrol forms they dont understand aspx or html pages.
So I need some solution to handle this...
I hope u understood my problem..
Thanks...
|
|
|
|
|
ASP.NET 2.0 wrote: my project understand only usercontrol forms they dont understand aspx or html pages.
What this means ? I am not getting what you are trying to do. Can you please provide more information on this ? What happened after you tried my suggestion ? Was that working ?
|
|
|
|
|
Sir I am using Dot Net Nuke code where I tried using your suggestion before only but its not working.
So I thought of make use of Javascript to get the value of tab selected index and depending on that display the data.
Any suggestions???
|
|
|
|
|
ASP.NET 2.0 wrote: Dot Net Nuke code
oops, sorry I don't have any idea on dot net nuke
|
|
|
|
|
Did you check that the ClientState of the TabContainer isn't holding the selected Tab already? Just guessing though.
(Assuming you use the ASP.NET 2.0 AJAX 1.0 Control Toolkit TabControl)
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Thanks for the reply. Here is the javascript code:
function ActiveTabChanged(sender, e)
{
var mytool_array=sender.get_activeTab().get_id().split("_");
document.getElementById("<%=htxtQueryStringValues.ClientID%>").value = "fromtab=true&tab=" +mytool_array[4] +"&sheet=" +sender.get_activeTab().get_headerText() ;
document.getElementById('txtQueryString').value = "fromtab=true&tab=" +mytool_array[4] +"&sheet=" +sender.get_activeTab().get_headerText() ;
alert(document.getElementById("<%=htxtQueryStringValues.ClientID%>").value);
window.location.reload();
}
And on page load I am checking the value but I am not getting the value of hidden textbox.
Please help me...
|
|
|
|
|
You can check the ActiveTab property of your AjaxControlToolkit.TabContainer during the postback to get access to the current tab.
And ActiveTab.HeaderText to access the heading of it.
Have a look at the sample web site that is included in the ajax toolkit download.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
I suppose u didnt undertsood my problem. Here is the code of Page load:
AjaxControlToolkit.TabPanel tab0 = new AjaxControlToolkit.TabPanel();
tab0.ID = "0";
tab0.HeaderText = "Summary";
tab0.Attributes.Add("onclick", "myfunc(" + tab0.ID + ");");
Label lblcompany = new Label();
lblcompany.Text = Session["CompanyName"].ToString();
tab0.Controls.Add(lblcompany);
TabSheet.Tabs.Add(tab0);
AjaxControlToolkit.TabPanel tab11 = new AjaxControlToolkit.TabPanel();
tab11.ID = "11";
tab11.HeaderText = "Ratio";
tab11.Attributes.Add("onclick", "myfunc(" + tab11.ID + ");");
Label lblcompany11 = new Label();
lblcompany11.Text = Session["CompanyName"].ToString();
tab11.Controls.Add(lblcompany11);
TabSheet.Tabs.Add(tab11);
string strqry = My Query through which I get the Tab Name from Database";
DataSet ds = new DataSet();
switch (Convert.ToInt16(Session["Country"]))
{
case 1:
ds = cs.Return_Dataset(strqry, cs.connectionUS());
break;
case 2:
ds = cs.Return_Dataset(strqry, cs.connectionUK());
break;
case 3:
ds = cs.Return_Dataset(strqry, cs.connectionJP());
break;
default:
ds = cs.Return_Dataset(strqry, cs.connectionUS());
break;
}
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
AjaxControlToolkit.TabPanel tab1 = new AjaxControlToolkit.TabPanel();
tab1.Height = 5;
tab1.ID = Convert.ToString(ds.Tables[0].Rows[i]["subformid"]);//(dt.Rows[i]["subformid"]);
tab1.HeaderText = (string)(ds.Tables[0].Rows[i]["sheetname"]);//dt.Rows[i]["sheetname"];
tab1.Attributes.Add("onclick", "myfunc(" + tab1.ID + ");");
Label lblcompany1 = new Label();
lblcompany1.Text = Session["CompanyName"].ToString() + " (all numbers are in thousands) ";
Label lblsc = new Label();
if (str != "")
{
lblsc.Text = " " + " Scenario: " + str;
}
tab1.Controls.Add(lblcompany1);
tab1.Controls.Add(lblsc);
TabSheet.Tabs.Add(tab1);
}
TabSheet.ActiveTabIndex = 0;
apsx file has:
<ajaxToolkit:TabContainer runat="server" ID="TabSheet" OnClientActiveTabChanged="ActiveTabChanged">
</ajaxToolkit:TabContainer>
And Javascript Function:
function ActiveTabChanged(sender, e)
{
var mytool_array=sender.get_activeTab().get_id().split("_");
document.getElementById("<%=htxtQueryStringValues.ClientID%>").value = "fromtab=true&tab=" +mytool_array[4] +"&sheet=" +sender.get_activeTab().get_headerText() ;
alert(document.getElementById("<%=htxtQueryStringValues.ClientID%>").value);
window.location.reload();
}
Now tell me how do I do???
|
|
|
|