|
The first step would be some sort of IP mapping to work out the location of your user, unless you ask them. But, given that an ASP.NET program never interacts with the keyboard directly the way a winforms app can, I'm not sure what it is you're asking. Are you talking about the language of the page, not the keyboard setting ? In that case, see my first sentence.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: The first step would be some sort of IP mapping to work out the location of your user, unless you ask them
I would rather use the browser locale setting.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Well, if that gets posted to the server, then use that. Assuming it is set correctly.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
How can I set paper size before printing a document using window.print()
|
|
|
|
|
you can't. You seem to have a shaky grasp of what javascript it designed for, and what it can hope to achieve.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You can only call window.print to open the Print dialog box. After that the user will set the pagesize himself.
|
|
|
|
|
|
Could you pls send the code that you use for exporting. I think there might be problem about response encoding.
|
|
|
|
|
please share idea if any developed Floating login like www.ups.com.
please help me and also give me a sample code or any url if possible.
Thanks in advance.
tbhattacharjee
|
|
|
|
|
That can be easily done by DIV .
|
|
|
|
|
hello,
i have a GridView in Itemtemplate there are two link buttons
with command name "Edit"
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID='lnkYesHelp' CommandName='Edit' runat="server" Text='yes' Font-Bold="true"></asp:LinkButton>
<asp:LinkButton ID='lnlNoHelp' CommandName='Edit' runat="server" Text='no' Font-Bold="true"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
on when RowEditing event get fired how i know which button user clicked
|
|
|
|
|
I am developing a web application where, I have a content editor and preview
button. On click of the Preview button, i am showing a ModalDialogBox to see the changes in the editor.
But my concern is the content can be so lengthy and sometimes, 40 to 50 lines of text.
How can I pass the editor content to the modaldialog box in this case.
The preview I am trying to implement is similar to Codeproject message preview.
Any help would be appreciated.
CodingRocks
ASP.NET,C#.NET Programmer
BANGALORE
"Winners don't do different things. They do things differently. ...
|
|
|
|
|
codingrocks wrote: The preview I am trying to implement is similar to Codeproject message preview.
If you have a close look at the preview you would notice that the ID of the Textbox is passsed in the URL. Thus you can access the content of the textbox by using the following javascript code.
window.opener.getElementByID("TextBoxID").value
Hope it helps.....
When you fail to plan, you are planning to fail.
|
|
|
|
|
|
I don't see any reason for this not to work. Are you sure it never gets called ? Where is the code in question ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
problem was in HTML code of the page, AutoEventWireup="true" was set to false. once i set it to true everything worked!
thank you
|
|
|
|
|
|
sorry but i didnt want to spam this board with trivial problems
i wont next time
|
|
|
|
|
nicromonicon wrote: sorry but i didnt want to spam this board with trivial problems
You know the question you have asked, it may be a problem for some others. So if the search in the forum they can easily get from the question. But, Now they couldn't.
nicromonicon wrote: i wont next time
|
|
|
|
|
hi friends i have a problem .... i want to hide all fields from gridview when there is no value in the cell found in a row of gridview .... the gridview is bounded to sqldatabase... through C# code...
plz friends give me some guidence.. thanks in advance
|
|
|
|
|
solo_gaurav wrote: i want to hide all fields from gridview when there is no value in the cell found in a row of gridview
Gaurav,
You want to mean, you want to hide complete row if any of the column field is Blank?
if yes, What is ur sql data source ? Is it DataSet or what ? You have to check in GridView RowBound Event for each column data. Before binding read the source data, if all column available, then bind else move to next records.
This is just an idea, you need to implement it
Let me know if any issue.
|
|
|
|
|
no i dont want to hide whole row.. i just want to hide cell from row...
can i give my code here it is
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.Odbc;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
string selectSQL = "SELECT * FROM test ";
OdbcConnection con = new OdbcConnection("Dsn=PostgreSQL35W123;uid=postgres;pwd=abc");
OdbcCommand cmd = new OdbcCommand(selectSQL, con);
con.Open();
cmd.Connection = con;
DropDownList1.DataSource = cmd.ExecuteReader();
DropDownList1.DataTextField = "Journal_Title";
this.DataBind();
con.Close();
DropDownList1.SelectedIndex = -1;
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
string selectSQL = "SELECT * FROM test where Journal_Title='" + DropDownList1.SelectedItem.Text + "'";
OdbcConnection con = new OdbcConnection("Dsn=PostgreSQL35W123;uid=postgres;pwd=abc");
OdbcCommand cmd = new OdbcCommand(selectSQL, con);
con.Open();
cmd.Connection = con;
cmd.ExecuteNonQuery();
OdbcDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
GridView1.DataSource = dr;
GridView1.DataBind();
Label1.Text = "found";
}
else
{
Label1.Text = "not found";
}
}
}
now i want that when a dropdownlist item is selected then it show a griview with only those cells which has data in them... and the cell with no data(null) , i want them to be hidden abhijit plz help if you get it
|
|
|
|
|
solo_gaurav wrote: if (dr.HasRows)
{
GridView1.DataSource = dr;
GridView1.DataBind();
Label1.Text = "found";
}
So rather than assigning Gridview Source over here, you just create a Temp Arraylist/ Dataset from the DataReader(Dr) with those rows you wants. Then assing the Team DataSource to GridView.
Hope you have understand what I am saying
|
|
|
|
|
you are saying right but.. i cant change code but only add new block of code to it..
means i want some lines of code that could help me in ommiting those cells which have null value
|
|
|
|
|
Hi all,
Following is my code for setting the data source for a cystal report which i m using in my project.
protected void DDL_Departments_SelectedIndexChanged(object sender, EventArgs e)
{
int deptid=int.Parse(DDL_Departments.SelectedValue);
EmployeesTableAdapters.Get_Employee_By_Department _emp_adapter=new EmployeesTableAdapters.Get_Employee_By_Department();
Employees.EmployeesDataTable _emp;
_emp=_emp_adapter.Get_Employees_By_Dept(deptid);
_rdc.SetDataSource(_emp);
CR_Emp_Viewer.ReportSource=_rdc;
CR_Emp_Viewer.DataBind();
}
but its giving me a compile time error stating
CS0121: The call is ambiguous between the following methods or properties: 'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Collections.IEnumerable)' and
'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Data.DataTable)'
What do i need to do to solve this issue????
Also its surprising that a similar code i wrote in VB runs successfully.:confused::confused::confused:
I am using VS 2005, 2.0 framework.
When you fail to plan, you are planning to fail.
|
|
|
|