|
hello,
i have a strange phenomenon which happens only at the remote site.
it doesnt happen in my local machine.
i noticed that the PageInit is called twice in the master page.
i know that because i trapped there an Exception that writes to a file
the information of the Exception.
the file was written twice with the delay of approx 300 msec between them.
(i use a tick counter to construct the file name)
in the local machine the file is written only once.
does anyone have an idea why this happens ?
tnx,
avi
|
|
|
|
|
shabya wrote: does anyone have an idea why this happens ?
Its really difficult unless you debug
Well, do you know that you can also debug a remot site from VS?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
mm.. interesting.
i put a trap for all the events and all of them loaded only once.
(pageload, pageinit)
the twice load happened only when there was an exception.
the exception was called twice.
is there a retry or something?
|
|
|
|
|
Is the Page_Load event also called twice?
If so, look into this link[^]
|
|
|
|
|
mm.. interesting.
i put a trap for all the events and all of them loaded only once.
(pageload, pageinit)
the twice load happened only when there was an exception.
the exception was called twice.
is there a retry or something?
|
|
|
|
|
Hi all,
I have view of some example (globalization) to develop a multilingua web site. But still cant success on it.i have create a .resx file call rsc.zh-CHS.resx in floder App_GlobalResources. Then using the the code following to display selected language. And also use a dropdownlist to select a preferral language
private ResourceManager rm;
protected void Page_Load(object sender, EventArgs e)
{
CultureInfo ci;
if (!IsPostBack)
{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
rm = new ResourceManager("rsc", Assembly.Load("App_GlobalResources"));
ci = Thread.CurrentThread.CurrentCulture;
LoadData(ci);
}
else
{
rm = new ResourceManager("rsc",Assembly.Load("App_GlobalResources"));
ci = Thread.CurrentThread.CurrentCulture;
LoadData(ci);
}
}
public void LoadData(CultureInfo ci)
{
lblCNName.Text = rm.GetString("lblCNName", ci);
lblENName.Text = rm.GetString("lblENName", ci);
}
I get a error in LoadData() and said that:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "rsc.resources" was correctly embedded or linked into assembly "App_GlobalResources.qb8c2ydr" at compile time, or that all the satellite assemblies required are loadable and fully signed.
Note: my example come from http://ashrafur.wordpress.com/2008/01/17/multi-language-supported-web-site-in-aspnet/[^]
any tips are welcome.
regards
cocoonwls
|
|
|
|
|
Did you added there a default resource file ?
Parwej Ahamad
|
|
|
|
|
Hi there,
Sorry for late reply.Thanks for your information.I have solve my problem~
regards
cocoonwls
|
|
|
|
|
how can i use datetime piker associated with a textbox which sows date selected in page.
|
|
|
|
|
|
Hi..
Below is my databse table..
I can populate this data into the UI Page..
My task is to automatically delete the columns which has '0'(zero) value...and i have to delete the first row of my table...
Hear i am not going to use any itemtemplate column..
I have to write some code in codebehind..
JurisdictionID JurisdictionDescription Year1 Year2 Year3 Year4 Year5 Year6 Year7 2005 2006 2009 0 0 0 0 AL Alabama 0 0 6 0 0 0 0 AK Alaska 2 0 0 0 0 0 0
Could Anyone suggest me ..How to proceed further in detail with some code...
modified on Monday, June 1, 2009 12:14 PM
|
|
|
|
|
If you are just displaying data in the UI , I would recommend a repeater. it is much lighter.
As for deleting 0 values simply add a constraint to your where clause in the proc where you are retrieving data.
|
|
|
|
|
Here is a code might help you. I think you are using MSSQL server 2005.
SqlConnection cnnew SqlConnection(...your_connection_string....);
SqlCommand cmd=new SqlCommand();
cmd.Connection=cn;
cmd.CommandText="your_proc";
cmd.CommandType=CommandType.StoredProcedure;
...
...
SqlDataAdapter adp=new SqlDataAdapter(cmd);
DataTable dt=new DataTable();
adp.Fill(dt);
GridView v=new GridView();
v.DataSource=dt;
v.DataBind();
form1.Controls.Add(v);
..
..
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
logic 1:
When you fetch the values from the table, write query like this
select case empty_column when 0 then '' from table_name
where <condition>
logic 2:
If you use gridview, in GridView1_RowDataBound event you can check like this,
if (e.Row.Cells[1].Text.Equals("0"))
{
e.Row.Cells[1].Text = "";
}
Hope it helps you.
|
|
|
|
|
hey thnx for your reply..actually my task is described below in detail..
Below is my databse table..
I can populate this data into the UI Page..
My task is to automatically delete the columns which has '0'(zero) value...and i have to delete the first row of my table...
Hear i am not going to use any itemtemplate column..
I have to write some code in codebehind..
JurisdictionID JurisdictionDescription Year1 Year2 Year3 Year4 Year5 Year6 Year7
2005 2006 2009 0 0 0 0
AL Alabama 0 0 6 0 0 0 0
AK Alaska 2 0 0 0 0 0 0
Could Anyone suggest me ..How to proceed further in detail with some code...:
modified on Monday, June 1, 2009 1:04 PM
|
|
|
|
|
Im looking to display xml values via a datagrid. And so far Ive had luck with everything, except nested values.
<?xml version="1.0" encoding="UTF-8"?>
<Collection>
<Content>
<ID>16938</ID>
<Type>Content</Type>
<Title>Smartform2</Title>
<QuickLink>/it.aspx?id=16938</QuickLink>
<Teaser>
<p>SmartForm1Smartform2Smartform3Smartform4</p>
</Teaser>
<Html>
<root>
<Field1>
<Field2>
<Test1>SmartForm1</Test1>
<Test2>Smartform2</Test2>
</Field2>
<Field2>
<Test1>Smartform3</Test1>
<Test2>Smartform4</Test2>
</Field2>
</Field1>
</root>
</Html>
<StartDate>1/1/0001 12:00:00 AM</StartDate>
<DateModified>5/28/2009 3:02:59 PM</DateModified>
<DateCreated>5/28/2009 3:02:49 PM</DateCreated>
<EndDate>12/31/9999 11:59:59 PM</EndDate>
<LastEditorFname>Erik</LastEditorFname>
<LastEditorLname>Kozlowski</LastEditorLname>
<Hyperlink>
<a href="/it.aspx?id=16938">Smartform2</a>
</Hyperlink>
<DisplayStartDate/>
<FolderID>2594</FolderID>
<ContentStatus>A</ContentStatus>
<Language>1033</Language>
<DisplayDateModified>5/28/2009</DisplayDateModified>
<DisplayDateCreated>5/28/2009</DisplayDateCreated>
<DisplayEndDate/>
<EndDateAction>Archive_Expire</EndDateAction>
<Comment/>
<Image>/WorkArea/images/application/spacer.gif</Image>
<ImageThumbnail>/WorkArea/images/application/thumb_spacer.png</ImageThumbnail>
<FilePath>/it.aspx?id=16938</FilePath>
</Content>
<Content>
<ID>16936</ID>
<Type>Content</Type>
<Title>Test smartform 1</Title>
<QuickLink>/it.aspx?id=16936</QuickLink>
<Teaser>
<p>Smart1Smart2Smart3Smart4</p>
</Teaser>
<Html>
<root>
<Field1>
<Field2>
<Test1>Smart1</Test1>
<Test2>Smart2</Test2>
</Field2>
<Field2>
<Test1>Smart3</Test1>
<Test2>Smart4</Test2>
</Field2>
</Field1>
</root>
</Html>
<StartDate>1/1/0001 12:00:00 AM</StartDate>
<DateModified>5/28/2009 3:00:24 PM</DateModified>
<DateCreated>5/28/2009 3:00:18 PM</DateCreated>
<EndDate>12/31/9999 11:59:59 PM</EndDate>
<LastEditorFname>Erik</LastEditorFname>
<LastEditorLname>Kozlowski</LastEditorLname>
<Hyperlink>
<a href="/it.aspx?id=16936">Test smartform 1</a>
</Hyperlink>
<DisplayStartDate/>
<FolderID>2594</FolderID>
<ContentStatus>A</ContentStatus>
<Language>1033</Language>
<DisplayDateModified>5/28/2009</DisplayDateModified>
<DisplayDateCreated>5/28/2009</DisplayDateCreated>
<DisplayEndDate/>
<EndDateAction>Archive_Expire</EndDateAction>
<Comment/>
<Image>/WorkArea/images/application/spacer.gif</Image>
<ImageThumbnail>/WorkArea/images/application/thumb_spacer.png</ImageThumbnail>
<FilePath>/it.aspx?id=16936</FilePath>
</Content>
</Collection>
If I choose Datemodified or Teaser for example, its fine. But I dont seem to have the right syntax for a nested value. Any ideas or am I going about this in the wrong direction?
|
|
|
|
|
I am assuming you are loading the xml to a dataset before binding the grid. Since you have nested xml, they will be loaded as different datatables I think. If this is the case, you can use the merge function to marge the datatables in your dataset and get it to display in your grid. This will be my first try.. There are many other way to do this. It all depends on the complixity of your xml structure
|
|
|
|
|
After loading an XML file into DataSet; DataSet creates number of DataTable instances so you have to decide which datatable instance you want to use.
For Example,
DataSet ds=new DataSet();
ds.ReadXml(....);
// List of DataTables
for(int i=0;i<ds.tables.count;i++) {
="" messagebox.show(ds.tables[i].tablename);
}=""
<div="" class="ForumSig">A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
Hi,
I have a GridView which is showing a number of records.
Each record can be grouped by a column called "Status" and there are several possible status values, e.g. New, Open, Closed, Deferred, etc.
I've added a drop-down list and a button which allows me to choose one status value to be displayed in the list. I do this by setting the .FilterExpression property on my GridView and this works great. However, now there are loads of records on the system, I really need to be able to apply one or *more* status values to filter the GridView on. So I'd like to be able to choose, say, "New" and "Deferred".
I started off by adding a number of checkboxes, one for each possible status with the idea that I'd read the values and build a suitable filter expression but it's really clumsy looking.
What I'm looking for is a more elegant way of building up my FilterExpression string using checkboxes. Can anyone suggest an approach?
Thanks - and have a great weekend
|
|
|
|
|
Try CheckBoxList
You can iterate through the list and get the text value of each item whose Checked value is True .
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
how to handle changepassword button click event in changepassword control.
I didn't get its click event plz help...
|
|
|
|
|
The ChangePassword controls changes the password through the MembershipProvider specified in the web.config.
Look into ChangingPassword and ChangedPassword Events. These events will be fired before and after respectively if you click 'Change Password' button.
|
|
|
|
|
why do you need click event of changepassword control. You can use ChangePassword1_ChangingPassword() event instead.
|
|
|
|
|
Had you configured your web application with WAT - Web application administrative tool?
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
I am providing the user the option of adding image/smiley using FCKeditor.
but in my home page where i want to show only an abstract of the content,
i do not want to show either the image or the smiley that the user could
have added.
so inorder to create an abstract of the content, how to I ignore / filer out
images and smileys?
AT PRESENT, i am using string manipulation to remove substring between
"<img" and="" "="">". Is it the correct approach?
Thanks,
Netquestions
modified on Friday, May 29, 2009 10:55 AM
|
|
|
|