|
Hi
I want ajax based language translator in my asp.net website just like as in www.doisystems.com[^]
Is there any sample code to implement this? as I want flags to be shown on top and whole site language get converted.
Thanks in advance.
|
|
|
|
|
sumit7034 wrote: Is there any sample code to implement this
Globalization and localization demystified in ASP.NET 2.0[^]
What you need is to have an outer update panel (in which all the controls are present), to give you feel of no full postback. Cde behind, on the server side, re-construct the UI and it should be rendered.
Events that would trigger this change would be country image button clicks.
|
|
|
|
|
hi.currently i m using asp.net 2.0 (2005) C# coding.
when user save a record, that records REMARKS should be shown to another person(person id available in another table record) as popup or like Instant message. how to achieve it? help me - KARAN
|
|
|
|
|
Karan_TN wrote: that records REMARKS should be shown to another person
So is this 'remark' of yours be shown to a person who is logged in and sitting somewhere else? What if he is not logged in?
From what you have told, looks like an indicator to someone after a certain event. So, you can email the person once save happens through your code. Emailing would avoid scenarios like other person not logged in or so.
|
|
|
|
|
private void checkButtonDoubleClick(Button button)
{
System.Text.StringBuilder sbValid = new System.Text.StringBuilder();
sbValid.Append("if (typeof(Page_ClientValidate) == 'function') { ");
sbValid.Append("if (Page_ClientValidate() == false) { return false; }} ");
sbValid.Append("this.value = 'Please wait...';");
sbValid.Append("this.disabled = true;");
sbValid.Append(this.Page.ClientScript.GetPostBackEventReference(button, ""));
sbValid.Append(";");
button.Attributes.Add("onclick", sbValid.ToString());
}
the above coding avoid double click for an button..
also the same i would like to apply for an dropdownlist. because according to the selection of dropdown value, i m changing the button textvalue. according to the text value i m calling different functions.so when user select the dropdownlist item, it take some time. during that time, user should not click the button obviously.
so i want to disable the button while user selecting item from dropdownlist until the text changes.
how to achieve it? help me - KARAN
|
|
|
|
|
Karan_TN wrote: so i want to disable the button while user selecting item from dropdownlist until the text changes.
If doing all the stuff client side then:
Attach a javascript function to Dropdownlist items or to Dropdown change event. In that JS function, just disable the button. Once you are ready with all the stuff, enable it back (like while calling different function)
If doing all the stuff server side then:
In selectedindex change event, disable the button. After you have worked on other functions, at the end enable the button.
|
|
|
|
|
hi,
I am developaing a asp.net application, for gatherign user feedback. In this, system will displaying question and options for user selection. I am using feedback.aspx page to display question and option, and master page for displaying header and footer. Ajax update panel is used in feedback.aspx page for partial postback.
Here, I have to implement session timeout for alerting user 'your session will be expired - click ok to referesh...'. If user click ok button I have to extend the session timeout. I have implemented session timeout, but session is getting timeout while user is working on the page continuously....this leeds to user frestration...
I have traced out, that session is not getting refereshed while partial page is postbacked..
Can any one suggest me solution on this..
Ilango.
|
|
|
|
|
Updatepanel uses XMLHTTPRequest to interact with server and get back responses. XMLHTTPRequest will send the session cookie, but on response it does not read and update the browser's session cookie, so after 20 mins (or defined time in config) the session cookie times out (in the browser) and is no longer sent to
the server.
You can switch to cookieless sessions or update the browser cookie using a server request via an image or an iframe.
|
|
|
|
|
Hi..
I am getting below error while executing this code:last line of code is throwing the error.-"Format exception unhandled by code.String was not recognized as a valid Boolean."
WinnersBLL objperiods = new WinnersBLL();
DataTable dt_GetCurrentPeriod = new DataTable();
dt_GetCurrentPeriod = (DataTable)Session["WinBudget"];
GridEditableItem insertedItem = e.Item as GridEditableItem;
if(Convert.ToBoolean(dt_GetCurrentPeriod.Rows[0]["IsCurrentPeriod"].ToString()) == true)
{
some task.
}
If "Iscurrentperiod" column in the datatable is null ,its giving the error.
how to check for null or false ?
|
|
|
|
|
bigphish wrote: Convert.ToBoolean(dt_GetCurrentPeriod.Rows[0]["IsCurrentPeriod"].ToString())
Error is raised if the converted string value of dt_GetCurrentPeriod.Rows[0]["IsCurrentPeriod"] is not a 'true ' or 'false '. Anything other then them would raise that error.
Try something like this:
if(dt_GetCurrentPeriod.Rows[0]["IsCurrentPeriod"] != null)
{
if(Convert.ToBoolean(dt_GetCurrentPeriod.Rows[0]["IsCurrentPeriod"].ToString()) == true)
{
}
}
|
|
|
|
|
hi..,
if,
dt_GetCurrentPeriod.Rows[0]["IsCurrentPeriod"] is 'false' also its giving error..It is working fine only if "IsCurrentPeriod" is true..
If the field is null its taking as false and giving error.I made this as nullable column.
|
|
|
|
|
ANY UPDATE ON THIS?
nothing is working for me..
|
|
|
|
|
bigphish wrote: how to check for null or false
To check for null...
if (dataRow.IsNull("ColumnName"))...
To check for false...
if (!Convert.ToBoolean(dataRow["ColumnName"]))...
|
|
|
|
|
Sir,
I am working on a login form on ASP.NET/C#.
I have everything working in the Visual Studio's integrated web server.
I setup a role named "Administrators" and configured a user with a username and password in the ASP.NET's WebSite Administration Tool. I got everything working fine under Visual Studio.
But when I deployed the web application and went to IIS, the login form is not working. The pages are properly loading but when I pressed the Login button, the login page shows a login fail as part of the login control.
I shall be much thankful to you if you kindly download the 180KB project files(no database dependancy) and try this out in IIS v5 and please suggest me a solution.
I used the following details when I used the WebSite administration tool of ASP.NET
role name : Administrators
username: admin
password : bookshop!
I want the login working fine under IIS.
Help me urgently , I am in the middle of my academic project.
PLS DOWNLOAD THE PROJECT FILES FROM THE LINK BELOW (only login part included)
http://sherin2701.googlecode.com/files/login_test.rar[^]
|
|
|
|
|
1) No one is going to download you project files
2) Giving username and passwords is just plain idiotic
3) This is your project and I'm sure the goal your teacher had in mind was for you to figure it out.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
This is where we post doubts. I am new to this.
Doubts are consequence of ignorance.
Ignorance makes me to say idiotic things. It was so disappointing.
Help me plz
|
|
|
|
|
Just another please-feed-me-here's-my-spoon kid.
|
|
|
|
|
Hi Everyone,
There is a problem that I'm facing w.r.t the datepicker in JQuery (.net 4.0).
I'm creating a clone of the existing row on add-button click. The existing row has two textboxes for editing(datepicker), add-button, remove-button.
On click of add-button, a row is appended (parent row is cloned). Cloning is done using following code (For cloned row there is no add-button):
var newFromDateInput = $("<input />").attr("class", removedFromDateInput.attr("class"))
.attr("id", removedFromDateInput.attr("id"))
.attr("name", removedFromDateInput.attr("name"))
.removeClass("hasDatepicker");
var newToDateInput = $("<input />").attr("class", removedToDateInput.attr("class"))
.attr("id", removedToDateInput.attr("id"))
.attr("name", removedToDateInput.attr("name"))
.removeClass("hasDatepicker");
removedFromDateInput.after(newFromDateInput);
removedToDateInput.after(newToDateInput);
removedFromDateInput.remove();
removedToDateInput.remove();
InitializeDatePickers();
The code for InitializeDatePickers() is as follows:
function InitializeDatePickers() {
ConsoleLog();
var maxDate = $("#model_BenefitPeriodEndDate").val();
var minDate = $("#model_BenefitPeriodStartDate").val();
$(".datePicker").datepicker({
onSelect: function(dateText, inst) {
MarkRecalculateThisBenefit(this);
},
maxDate: new Date(maxDate),
minDate: new Date(minDate),
changeMonth: true,
changeYear: true
});
ApplyDatePickerTextBoxKeyPress(".datePicker");
}
Problem faced: While editing the dates for cloned row using datepicker, the datepicker is updating the parent row instead of cloned row.
Thanks.
|
|
|
|
|
hi friends...
i developed one site ,design is gud in mozilla...where as in google crome and safari the design is changing,means everything extending ....
Txs in adivance
Supriya.
|
|
|
|
|
|
Hi
how to get no of month between 2 dates iin c#
Thanks ,
Amit
|
|
|
|
|
|
thanks ,
I have created my own logic
int monthsApart = 12 * (DateTime.Now.Year - startDateTime1.Year) + DateTime.Now.Month - startDateTime1.Month;
i hope this will help others
Thanks
|
|
|
|
|
Great. How long did you spend creating something that already exists? Why not learn to use the tools you have.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
hi iam using asp.net with c#
in my form there is file upload control to browse and get the image and there is dropdownlist control from which i have to select the items ,
on selecting the items from dropdownlist onselectedindex changed event ,the file upload control is becomming empty how to handle this situation
can you give example which helps me
|
|
|
|