|
Hi All,
I need to change the Current Culture Dynamically..
That's means ,When I click button ,I need to change the current Culture...
How Can I do it?.
When I used below code,It is not working
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Can any one help me to correct this?
I need to change culture dynamically...
Thanks in advance..
|
|
|
|
|
Anoter one Doubt in the Browsers settings.i.e., in IE the did you change the culture by going to Internet Options->General->Languages. For this to work, you need to set both the Culture and the UICulture to auto and enableClientBasedCulture = true as:
GLOBALIZATION culture="auto" uiculture="auto" enableClientBasedCulture="”true”" .
Hope if you made this setting it should work.
Regards,
Satips.
|
|
|
|
|
Standard question #1:
What do you mean by "not working"?
Do you realise that you are only changing the culture for the page that is currently created? As each request runs in a separate thread, it will not affect subsequent requests.
---
single minded; short sighted; long gone;
|
|
|
|
|
I have a dataview which when exported into excel shows in very small font. i want to apply style sheet before i export.
How do i do it?
Kindly help.
Thanks & Regards
Biju S
|
|
|
|
|
Just the include your style inside a <STYLE> tag and append it with HTML String which you use to import as excel.
|
|
|
|
|
Thank you venkatesh.
can you suggest me some sample code? i tried giving style but didnt work out
|
|
|
|
|
Post your code where you export it. I will update the code.
|
|
|
|
|
here is my code.
Response.Clear();
gvCycleRpt.Columns[8].Visible = false;
string style = @" .text { mso-number-format:\@; } ";
Response.AddHeader("content-disposition", "attachment;filename=CycleReport.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
StringWriter StringWriter = new System.IO.StringWriter();
HtmlTextWriter HtmlTextWriter = new HtmlTextWriter(StringWriter);
gvCycleRpt.RenderControl(HtmlTextWriter);
// Style is added dynamically
Response.Write(style);
Response.Write(StringWriter.ToString());
Response.End();
gvCycleRpt.Columns[8].Visible = true;
Thanks & regards
Biju S
|
|
|
|
|
itsbijusamuel wrote: Response.Clear();
gvCycleRpt.Columns[8].Visible = false;
string style = @" .text { mso-number-format:\@; } ";
Response.AddHeader("content-disposition", "attachment;filename=CycleReport.xls");
Response.Charset = "";
Response.ContentType = "application/vnd.xls";
StringWriter StringWriter = new System.IO.StringWriter();
HtmlTextWriter HtmlTextWriter = new HtmlTextWriter(StringWriter);
gvCycleRpt.RenderControl(HtmlTextWriter);
// Style is added dynamically
Response.Write(style);
Response.Write(StringWriter.ToString());
Response.End();
gvCycleRpt.Columns[8].Visible = true;
Response.Clear();<br />
<br />
gvCycleRpt.Columns[8].Visible = false;<br />
string style = @"<style> .text { mso-number-format:\@; } </style> ";<br />
Response.AddHeader("content-disposition", "attachment;filename=CycleReport.xls");<br />
Response.Charset = "";<br />
Response.ContentType = "application/vnd.xls";<br />
StringWriter StringWriter = new System.IO.StringWriter();<br />
HtmlTextWriter HtmlTextWriter = new HtmlTextWriter(StringWriter);<br />
gvCycleRpt.RenderControl(HtmlTextWriter);<br />
StringBuilder sb = new StringBuilder();<br />
sb.Append(style);<br />
sb.Append(StringWriter.ToString());<br />
Response.Write(sb.ToString());<br />
Response.End();<br />
gvCycleRpt.Columns[8].Visible = true;
|
|
|
|
|
Hi All,
I want to change the UpdateText of a CommandField(Edit) on runtime in GridView.
For eg:
Now my defalt edit command has UpdateText as Edit. based on a condition i have to change the text to 'Approve'.
kindly some one help me achieve this.
Thanks and Regards,
Biju S.
|
|
|
|
|
itsbijusamuel wrote: Now my defalt edit command has UpdateText as Edit. based on a condition i have to change the text to 'Approve'
Click the Edit Columns in the Smart Tag menu of the GridView. Select the CommandField, you can change the Text of any field there.
Don't post again again...
|
|
|
|
|
I need to do this on runtime and not in design mode.
|
|
|
|
|
itsbijusamuel wrote: I need to do this on runtime and not in design mode.
Better use Template Item and add the controls whatever you want and change the Text whenever you want...
|
|
|
|
|
Hi all,
i need a suggestion ... I'm currently developing a small security application which secure entities depend on user permissions to access these entities.
my problem is: i have more than 50 permission every one of them has its own parameters for example a permission named 'access resource' need to specify the resource type which may be binded to another set of values and so one , once the user select the permission the input controls should be populated and request the user to enter these values.
how can i implement a generic permissions input ... without design the 50 permission inputs screen. ??
any idea ???
Hosam Kamel
Software Developer
|
|
|
|
|
One way to manage that many permissions is to group them into roles.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
I dont have the SQL EXPRESS installed instead I have SQL Standard Edition.
I have two SQL Server instances installed.
1- UserLT (this is sql 2000)
2- UserLT\SQL2005 (this is SQL 2005 named instance)
But when i try to add a database to my VS website project I get the following error:
Connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=4925
I went in Tools>Opetions>DataBase tools>Data Connection>Sql Server Instance Name (blank for default)
and changed the "SQLEXPRESS" to "USERLT\SQL2005".
But I still get the same error message. Any ideas how i can resolve this issue?
|
|
|
|
|
Hello all!
I want to have a input file dialog on a button click much like the dialog which opens when we click the browse button on the FileUpload control.
Thankyou
Waiting in anticipation
Sam
-- modified at 12:23 Sunday 10th June, 2007
Bye
|
|
|
|
|
I'm afraid you will need an activex control for that. Normally you can't do that with asp.net. Depending of course on what you want to do with the dialog.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
|
|
|
|
|
Suppose that I have to do some encryption in my database. Those who have dealt with this stuff may already know that it's recommended to encrypt the encryption key using something like a machine key and storing them in registry or leave the key management to something like DPAPI.
Would someone please tell me what the problem is with simply storing the encryption key in a text file (in a plain text format) and then storing it in a folder whose read access been restricted to be available only to ASP.NET Process Identity through ACL permissions?
I mean, what DPAPI does is that it stores a secret key in windows registry whose access is restricted using ACL permissions. So, what's the difference if we simply store the key in a restricted folder as mentioned above?
Thanks in advance for any answer
Maysam
|
|
|
|
|
Hi,
I must add two neccessary namespaces into my all pages but it is boring. There is a way that i add these namespace only once and all pages use them ?
Thanks and Regards.
|
|
|
|
|
No
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
but it must be i saw it somewhere but i cant remember..
|
|
|
|
|
Hey,
I have a database and it contains article table so this table contains two field named Header and Content. Then i wanna show this data in a gridview control but there are two pages. the first one contains just label which is used to show any article's header and another label which is used to show some piece of article's content text. But how can i show some piece of article's content text to the user. For example i wanna get 5000 letters from begining of an article's content which is preserved in database.It is said there is an query to handle this.But i couldnt find that query.
Please help me. Thanks and regards..
|
|
|
|
|
Use the SUBSTRING function (or SUBSTR for Oracle) like
SELECT header, SUBSTRING(content, 0, 5000)
|
|
|
|
|
Thanks man
|
|
|
|