|
i have some question with regards to n-tier applications:
1. How do i design a layer?
--is it created in the App_code folder?
or is it a separate class library?
2. What is the design in layer application?
Thanks
|
|
|
|
|
you have to create a seperate class library then only you will get the DLL seperately and which can be modified with no modifications to your web project.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
Rolando Y. Puno wrote: How do i design a layer?
Depends what they layer does.
Rolando Y. Puno wrote: is it created in the App_code folder? or is it a separate class library?
It can be, but that is an implementatin detail, not a design detail. Typically, however you'd put each layer in its own class library. That way it is portable and can be reused elsewhere.
Rolando Y. Puno wrote: What is the design in layer application?
I don't know what you mean by "design in layer application".
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
|
Hi frd's
I am using Fusion charts for producation planning charts in my web application. But i did not find any feature to show Critical path in the Chart. Can you plase suggest me other Gantt charts.
Thanks & Regards,
Anil Chelasani
|
|
|
|
|
Hi,
i am using a charting component to generate graphs for which data is dynamically gets bind from db
In my page there is an image creation button is there, if a user clicks on that an image download dialogue will be displayed
The code i am using for it is
MemoryStream mstream = new MemoryStream();
try
{
Chart1.Save(mstream, ChartImageFormat.Png);
byte[] byteArray = mstream.ToArray();
Response.AddHeader("Content-Disposition", "attachment; filename=report.png");
Response.AddHeader("Content-Length", byteArray.Length.ToString());
Response.ContentType = "image/png";
Response.BinaryWrite(byteArray);
}
catch
{ }
finally
{
mstream.Flush();
mstream.Close();
}
The image downloading works fine, but after image download if i rebind the report again from db the page is taking too long to load, some times page loads partially,some times page gives some xml error, which i will work fine if i dont click image generating button only binds the report.
In my local system this works fine, but in staging server(IIS 6.0) it is giving the above problem
|
|
|
|
|
Hi,
now it is working fine,
i just put Response.End() after Response.BinaryWrite(byteArray);
and it is working,although i dont know the exact reason why
|
|
|
|
|
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)
|
|
|
|