473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Posting two times

I have a webform and in its load event, i'm binding values taken
from the database in more than one data list which is embedded
in a placeholder.

When, debug the code it seems the page_load event
called two times while loading the page.

I have pasted the code below.

Plz help me.

Vadivel Kumar

The CODE Starts here
***************************

if(!IsPostBack)
{
categories = new Categories.Biz.Categories("");
ModuleSelector m = (ModuleSelector) Page.FindControl("ModuleSelector1");
m.SelectedModule = "COMPANIES";
if(Request.QueryString.Count > 0)
{
if(Request.QueryString["id"].ToString().StartsWith(@"\"))
{
string hBronze = Utils.GetBronzeTemplate();
Response.Write(hBronze);
}

if(Request.QueryString["id"].ToString().StartsWith("C"))
{
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = "<a href=\"#\"> Home </a> >> <a href=\"companies.aspx\">
Companies </a> >> " + getCategoryPath(nRequestedId);
Application["SitePath"] = SitePath.Text;
dlSubCategory.DataSource =
categories.getCompanySubCategories(Convert.ToInt32 (nRequestedId));
dlSubCategory.DataBind();
}
if(Request.QueryString["id"].ToString().StartsWith("X"))
{
Add.Visible = true;
Inquire.Visible = true;
phTools.Visible = true;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = Application["SitePath"] + " > " +
getSubCategoryPath(nRequestedId);
Counter1.SubcategoryId = Convert.ToInt32(nRequestedId);
dsCompanies = categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataSource = dsCompanies;
//categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataBind();
}
}
else
{
SitePath.Text = "<a href=\"#\">Home</a> > <a href=\"companies.aspx\">
Companies </a>";
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
DataTable dtCategory = new DataTable("table1");
DataTable dtSubCat = new DataTable("table2");
dtCategory = categories.getCompanyCategories().Tables[0];
dtSubCat = categories.getCompanySubCategories().Tables[0];
DataSet dsWhole = new DataSet("Companies");
dsWhole.Tables.Add(dtCategory.Copy());
dsWhole.Tables[0].TableName = "CompanyCategory";
dsWhole.Tables.Add(dtSubCat.Copy());
dsWhole.Tables[1].TableName = "CompanySubCategory";
DataColumn dtParent = dsWhole.Tables["CompanyCategory"].Columns["CatId"];
DataColumn dtChild = dsWhole.Tables["CompanySubCategory"].Columns["CatId"];
DataRelation drPCRelation = new
DataRelation("CatSubCatRelation",dtParent,dtChild, false);
dsWhole.Relations.Add(drPCRelation);
dlCompCategory.DataSource = dsWhole.Tables["CompanyCategory"];
dlCompCategory.DataBind();
dsWhole.Dispose();
dtParent.Dispose();
dtChild.Dispose();
}
}
********************
Nov 19 '05 #1
6 983
In the .aspx file is AutoEventWireup set to false? Do you have any
attributes set for "body" tag?

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:eO*************@TK2MSFTNGP12.phx.gbl...
I have a webform and in its load event, i'm binding values taken
from the database in more than one data list which is embedded
in a placeholder.

When, debug the code it seems the page_load event
called two times while loading the page.

I have pasted the code below.

Plz help me.

Vadivel Kumar

The CODE Starts here
***************************

if(!IsPostBack)
{
categories = new Categories.Biz.Categories("");
ModuleSelector m = (ModuleSelector) Page.FindControl("ModuleSelector1");
m.SelectedModule = "COMPANIES";
if(Request.QueryString.Count > 0)
{
if(Request.QueryString["id"].ToString().StartsWith(@"\"))
{
string hBronze = Utils.GetBronzeTemplate();
Response.Write(hBronze);
}

if(Request.QueryString["id"].ToString().StartsWith("C"))
{
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = "<a href=\"#\"> Home </a> >> <a href=\"companies.aspx\">
Companies </a> >> " + getCategoryPath(nRequestedId);
Application["SitePath"] = SitePath.Text;
dlSubCategory.DataSource =
categories.getCompanySubCategories(Convert.ToInt32 (nRequestedId));
dlSubCategory.DataBind();
}
if(Request.QueryString["id"].ToString().StartsWith("X"))
{
Add.Visible = true;
Inquire.Visible = true;
phTools.Visible = true;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = Application["SitePath"] + " > " +
getSubCategoryPath(nRequestedId);
Counter1.SubcategoryId = Convert.ToInt32(nRequestedId);
dsCompanies = categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataSource = dsCompanies;
//categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataBind();
}
}
else
{
SitePath.Text = "<a href=\"#\">Home</a> > <a href=\"companies.aspx\">
Companies </a>";
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
DataTable dtCategory = new DataTable("table1");
DataTable dtSubCat = new DataTable("table2");
dtCategory = categories.getCompanyCategories().Tables[0];
dtSubCat = categories.getCompanySubCategories().Tables[0];
DataSet dsWhole = new DataSet("Companies");
dsWhole.Tables.Add(dtCategory.Copy());
dsWhole.Tables[0].TableName = "CompanyCategory";
dsWhole.Tables.Add(dtSubCat.Copy());
dsWhole.Tables[1].TableName = "CompanySubCategory";
DataColumn dtParent = dsWhole.Tables["CompanyCategory"].Columns["CatId"];
DataColumn dtChild = dsWhole.Tables["CompanySubCategory"].Columns["CatId"]; DataRelation drPCRelation = new
DataRelation("CatSubCatRelation",dtParent,dtChild, false);
dsWhole.Relations.Add(drPCRelation);
dlCompCategory.DataSource = dsWhole.Tables["CompanyCategory"];
dlCompCategory.DataBind();
dsWhole.Dispose();
dtParent.Dispose();
dtChild.Dispose();
}
}
********************

Nov 19 '05 #2
Gr8... It is working fine... Even i know this but, in mind
this issue didn't came. Thanks a lot

Vadivel Kumar

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez**************@TK2MSFTNGP10.phx.gbl...
In the .aspx file is AutoEventWireup set to false? Do you have any
attributes set for "body" tag?

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:eO*************@TK2MSFTNGP12.phx.gbl...
I have a webform and in its load event, i'm binding values taken
from the database in more than one data list which is embedded
in a placeholder.

When, debug the code it seems the page_load event
called two times while loading the page.

I have pasted the code below.

Plz help me.

Vadivel Kumar

The CODE Starts here
***************************

if(!IsPostBack)
{
categories = new Categories.Biz.Categories("");
ModuleSelector m = (ModuleSelector) Page.FindControl("ModuleSelector1");
m.SelectedModule = "COMPANIES";
if(Request.QueryString.Count > 0)
{
if(Request.QueryString["id"].ToString().StartsWith(@"\"))
{
string hBronze = Utils.GetBronzeTemplate();
Response.Write(hBronze);
}

if(Request.QueryString["id"].ToString().StartsWith("C"))
{
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = "<a href=\"#\"> Home </a> >> <a href=\"companies.aspx\">
Companies </a> >> " + getCategoryPath(nRequestedId);
Application["SitePath"] = SitePath.Text;
dlSubCategory.DataSource =
categories.getCompanySubCategories(Convert.ToInt32 (nRequestedId));
dlSubCategory.DataBind();
}
if(Request.QueryString["id"].ToString().StartsWith("X"))
{
Add.Visible = true;
Inquire.Visible = true;
phTools.Visible = true;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = Application["SitePath"] + " > " +
getSubCategoryPath(nRequestedId);
Counter1.SubcategoryId = Convert.ToInt32(nRequestedId);
dsCompanies = categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataSource = dsCompanies;
//categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataBind();
}
}
else
{
SitePath.Text = "<a href=\"#\">Home</a> > <a href=\"companies.aspx\">
Companies </a>";
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
DataTable dtCategory = new DataTable("table1");
DataTable dtSubCat = new DataTable("table2");
dtCategory = categories.getCompanyCategories().Tables[0];
dtSubCat = categories.getCompanySubCategories().Tables[0];
DataSet dsWhole = new DataSet("Companies");
dsWhole.Tables.Add(dtCategory.Copy());
dsWhole.Tables[0].TableName = "CompanyCategory";
dsWhole.Tables.Add(dtSubCat.Copy());
dsWhole.Tables[1].TableName = "CompanySubCategory";
DataColumn dtParent = dsWhole.Tables["CompanyCategory"].Columns["CatId"];
DataColumn dtChild =

dsWhole.Tables["CompanySubCategory"].Columns["CatId"];
DataRelation drPCRelation = new
DataRelation("CatSubCatRelation",dtParent,dtChild, false);
dsWhole.Relations.Add(drPCRelation);
dlCompCategory.DataSource = dsWhole.Tables["CompanyCategory"];
dlCompCategory.DataBind();
dsWhole.Dispose();
dtParent.Dispose();
dtChild.Dispose();
}
}
********************


Nov 19 '05 #3
And, tell me one thing
How you are identifying an issue is posted
in this group? Iam using outlook express. Is there any other thing to get
the
posts instantly?

Vadivel KUmar

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez**************@TK2MSFTNGP10.phx.gbl...
In the .aspx file is AutoEventWireup set to false? Do you have any
attributes set for "body" tag?

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:eO*************@TK2MSFTNGP12.phx.gbl...
I have a webform and in its load event, i'm binding values taken
from the database in more than one data list which is embedded
in a placeholder.

When, debug the code it seems the page_load event
called two times while loading the page.

I have pasted the code below.

Plz help me.

Vadivel Kumar

The CODE Starts here
***************************

if(!IsPostBack)
{
categories = new Categories.Biz.Categories("");
ModuleSelector m = (ModuleSelector) Page.FindControl("ModuleSelector1");
m.SelectedModule = "COMPANIES";
if(Request.QueryString.Count > 0)
{
if(Request.QueryString["id"].ToString().StartsWith(@"\"))
{
string hBronze = Utils.GetBronzeTemplate();
Response.Write(hBronze);
}

if(Request.QueryString["id"].ToString().StartsWith("C"))
{
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = "<a href=\"#\"> Home </a> >> <a href=\"companies.aspx\">
Companies </a> >> " + getCategoryPath(nRequestedId);
Application["SitePath"] = SitePath.Text;
dlSubCategory.DataSource =
categories.getCompanySubCategories(Convert.ToInt32 (nRequestedId));
dlSubCategory.DataBind();
}
if(Request.QueryString["id"].ToString().StartsWith("X"))
{
Add.Visible = true;
Inquire.Visible = true;
phTools.Visible = true;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = Application["SitePath"] + " > " +
getSubCategoryPath(nRequestedId);
Counter1.SubcategoryId = Convert.ToInt32(nRequestedId);
dsCompanies = categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataSource = dsCompanies;
//categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataBind();
}
}
else
{
SitePath.Text = "<a href=\"#\">Home</a> > <a href=\"companies.aspx\">
Companies </a>";
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
DataTable dtCategory = new DataTable("table1");
DataTable dtSubCat = new DataTable("table2");
dtCategory = categories.getCompanyCategories().Tables[0];
dtSubCat = categories.getCompanySubCategories().Tables[0];
DataSet dsWhole = new DataSet("Companies");
dsWhole.Tables.Add(dtCategory.Copy());
dsWhole.Tables[0].TableName = "CompanyCategory";
dsWhole.Tables.Add(dtSubCat.Copy());
dsWhole.Tables[1].TableName = "CompanySubCategory";
DataColumn dtParent = dsWhole.Tables["CompanyCategory"].Columns["CatId"];
DataColumn dtChild =

dsWhole.Tables["CompanySubCategory"].Columns["CatId"];
DataRelation drPCRelation = new
DataRelation("CatSubCatRelation",dtParent,dtChild, false);
dsWhole.Relations.Add(drPCRelation);
dlCompCategory.DataSource = dsWhole.Tables["CompanyCategory"];
dlCompCategory.DataBind();
dsWhole.Dispose();
dtParent.Dispose();
dtChild.Dispose();
}
}
********************


Nov 19 '05 #4
I am using JetBrains Omea Reader for reading blogs. It's also a news client.
It has notification feature.

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
And, tell me one thing
How you are identifying an issue is posted
in this group? Iam using outlook express. Is there any other thing to get
the
posts instantly?

Vadivel KUmar

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez**************@TK2MSFTNGP10.phx.gbl...
In the .aspx file is AutoEventWireup set to false? Do you have any
attributes set for "body" tag?

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:eO*************@TK2MSFTNGP12.phx.gbl...
I have a webform and in its load event, i'm binding values taken
from the database in more than one data list which is embedded
in a placeholder.

When, debug the code it seems the page_load event
called two times while loading the page.

I have pasted the code below.

Plz help me.

Vadivel Kumar

The CODE Starts here
***************************

if(!IsPostBack)
{
categories = new Categories.Biz.Categories("");
ModuleSelector m = (ModuleSelector) Page.FindControl("ModuleSelector1"); m.SelectedModule = "COMPANIES";
if(Request.QueryString.Count > 0)
{
if(Request.QueryString["id"].ToString().StartsWith(@"\"))
{
string hBronze = Utils.GetBronzeTemplate();
Response.Write(hBronze);
}

if(Request.QueryString["id"].ToString().StartsWith("C"))
{
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = "<a href=\"#\"> Home </a> >> <a href=\"companies.aspx\"> Companies </a> >> " + getCategoryPath(nRequestedId);
Application["SitePath"] = SitePath.Text;
dlSubCategory.DataSource =
categories.getCompanySubCategories(Convert.ToInt32 (nRequestedId));
dlSubCategory.DataBind();
}
if(Request.QueryString["id"].ToString().StartsWith("X"))
{
Add.Visible = true;
Inquire.Visible = true;
phTools.Visible = true;
string nRequestedId = Request.QueryString["id"].Substring(1);
SitePath.Text = Application["SitePath"] + " > " +
getSubCategoryPath(nRequestedId);
Counter1.SubcategoryId = Convert.ToInt32(nRequestedId);
dsCompanies = categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataSource = dsCompanies;
//categories.getCompanies(Convert.ToInt32(nRequested Id));
dlCompanies.DataBind();
}
}
else
{
SitePath.Text = "<a href=\"#\">Home</a> > <a href=\"companies.aspx\">
Companies </a>";
Add.Visible = false;
Inquire.Visible = false;
phTools.Visible = false;
DataTable dtCategory = new DataTable("table1");
DataTable dtSubCat = new DataTable("table2");
dtCategory = categories.getCompanyCategories().Tables[0];
dtSubCat = categories.getCompanySubCategories().Tables[0];
DataSet dsWhole = new DataSet("Companies");
dsWhole.Tables.Add(dtCategory.Copy());
dsWhole.Tables[0].TableName = "CompanyCategory";
dsWhole.Tables.Add(dtSubCat.Copy());
dsWhole.Tables[1].TableName = "CompanySubCategory";
DataColumn dtParent = dsWhole.Tables["CompanyCategory"].Columns["CatId"]; DataColumn dtChild =

dsWhole.Tables["CompanySubCategory"].Columns["CatId"];
DataRelation drPCRelation = new
DataRelation("CatSubCatRelation",dtParent,dtChild, false);
dsWhole.Relations.Add(drPCRelation);
dlCompCategory.DataSource = dsWhole.Tables["CompanyCategory"];
dlCompCategory.DataBind();
dsWhole.Dispose();
dtParent.Dispose();
dtChild.Dispose();
}
}
********************



Nov 19 '05 #5
I would like to send you a personal mail
about a project, which i'm starting
i feel great if you participate in that in some cases
if you can, plz provide your email-id so, that i can send you the mail.

rgds
Vadivel KUmar
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:O4**************@TK2MSFTNGP14.phx.gbl...
I am using JetBrains Omea Reader for reading blogs. It's also a news
client.
It has notification feature.

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
And, tell me one thing
How you are identifying an issue is posted
in this group? Iam using outlook express. Is there any other thing to get
the
posts instantly?

Vadivel KUmar

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez**************@TK2MSFTNGP10.phx.gbl...
> In the .aspx file is AutoEventWireup set to false? Do you have any
> attributes set for "body" tag?
>
> Eliyahu
>
> "Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
> news:eO*************@TK2MSFTNGP12.phx.gbl...
>> I have a webform and in its load event, i'm binding values taken
>> from the database in more than one data list which is embedded
>> in a placeholder.
>>
>> When, debug the code it seems the page_load event
>> called two times while loading the page.
>>
>> I have pasted the code below.
>>
>> Plz help me.
>>
>> Vadivel Kumar
>>
>> The CODE Starts here
>> ***************************
>>
>> if(!IsPostBack)
>> {
>> categories = new Categories.Biz.Categories("");
>> ModuleSelector m = (ModuleSelector) Page.FindControl("ModuleSelector1"); >> m.SelectedModule = "COMPANIES";
>> if(Request.QueryString.Count > 0)
>> {
>> if(Request.QueryString["id"].ToString().StartsWith(@"\"))
>> {
>> string hBronze = Utils.GetBronzeTemplate();
>> Response.Write(hBronze);
>> }
>>
>> if(Request.QueryString["id"].ToString().StartsWith("C"))
>> {
>> Add.Visible = false;
>> Inquire.Visible = false;
>> phTools.Visible = false;
>> string nRequestedId = Request.QueryString["id"].Substring(1);
>> SitePath.Text = "<a href=\"#\"> Home </a> >> <a href=\"companies.aspx\"> >> Companies </a> >> " + getCategoryPath(nRequestedId);
>> Application["SitePath"] = SitePath.Text;
>> dlSubCategory.DataSource =
>> categories.getCompanySubCategories(Convert.ToInt32 (nRequestedId));
>> dlSubCategory.DataBind();
>> }
>> if(Request.QueryString["id"].ToString().StartsWith("X"))
>> {
>> Add.Visible = true;
>> Inquire.Visible = true;
>> phTools.Visible = true;
>> string nRequestedId = Request.QueryString["id"].Substring(1);
>> SitePath.Text = Application["SitePath"] + " > " +
>> getSubCategoryPath(nRequestedId);
>> Counter1.SubcategoryId = Convert.ToInt32(nRequestedId);
>> dsCompanies = categories.getCompanies(Convert.ToInt32(nRequested Id));
>> dlCompanies.DataSource = dsCompanies;
>> //categories.getCompanies(Convert.ToInt32(nRequested Id));
>> dlCompanies.DataBind();
>> }
>> }
>> else
>> {
>> SitePath.Text = "<a href=\"#\">Home</a> > <a href=\"companies.aspx\">
>> Companies </a>";
>> Add.Visible = false;
>> Inquire.Visible = false;
>> phTools.Visible = false;
>> DataTable dtCategory = new DataTable("table1");
>> DataTable dtSubCat = new DataTable("table2");
>> dtCategory = categories.getCompanyCategories().Tables[0];
>> dtSubCat = categories.getCompanySubCategories().Tables[0];
>> DataSet dsWhole = new DataSet("Companies");
>> dsWhole.Tables.Add(dtCategory.Copy());
>> dsWhole.Tables[0].TableName = "CompanyCategory";
>> dsWhole.Tables.Add(dtSubCat.Copy());
>> dsWhole.Tables[1].TableName = "CompanySubCategory";
>> DataColumn dtParent = dsWhole.Tables["CompanyCategory"].Columns["CatId"]; >> DataColumn dtChild =
> dsWhole.Tables["CompanySubCategory"].Columns["CatId"];
>> DataRelation drPCRelation = new
>> DataRelation("CatSubCatRelation",dtParent,dtChild, false);
>> dsWhole.Relations.Add(drPCRelation);
>> dlCompCategory.DataSource = dsWhole.Tables["CompanyCategory"];
>> dlCompCategory.DataBind();
>> dsWhole.Dispose();
>> dtParent.Dispose();
>> dtChild.Dispose();
>> }
>> }
>> ********************
>>
>>
>
>



Nov 19 '05 #6
Just remove "removeme" prefix from the address in this message.

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:ON**************@tk2msftngp13.phx.gbl...
I would like to send you a personal mail
about a project, which i'm starting
i feel great if you participate in that in some cases
if you can, plz provide your email-id so, that i can send you the mail.

rgds
Vadivel KUmar
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:O4**************@TK2MSFTNGP14.phx.gbl...
I am using JetBrains Omea Reader for reading blogs. It's also a news
client.
It has notification feature.

Eliyahu

"Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
And, tell me one thing
How you are identifying an issue is posted
in this group? Iam using outlook express. Is there any other thing to get the
posts instantly?

Vadivel KUmar

"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message
news:ez**************@TK2MSFTNGP10.phx.gbl...
> In the .aspx file is AutoEventWireup set to false? Do you have any
> attributes set for "body" tag?
>
> Eliyahu
>
> "Vadivel Kumar" <do********@spam-i-love-u.com> wrote in message
> news:eO*************@TK2MSFTNGP12.phx.gbl...
>> I have a webform and in its load event, i'm binding values taken
>> from the database in more than one data list which is embedded
>> in a placeholder.
>>
>> When, debug the code it seems the page_load event
>> called two times while loading the page.
>>
>> I have pasted the code below.
>>
>> Plz help me.
>>
>> Vadivel Kumar
>>
>> The CODE Starts here
>> ***************************
>>
>> if(!IsPostBack)
>> {
>> categories = new Categories.Biz.Categories("");
>> ModuleSelector m = (ModuleSelector)

Page.FindControl("ModuleSelector1");
>> m.SelectedModule = "COMPANIES";
>> if(Request.QueryString.Count > 0)
>> {
>> if(Request.QueryString["id"].ToString().StartsWith(@"\"))
>> {
>> string hBronze = Utils.GetBronzeTemplate();
>> Response.Write(hBronze);
>> }
>>
>> if(Request.QueryString["id"].ToString().StartsWith("C"))
>> {
>> Add.Visible = false;
>> Inquire.Visible = false;
>> phTools.Visible = false;
>> string nRequestedId = Request.QueryString["id"].Substring(1);
>> SitePath.Text = "<a href=\"#\"> Home </a> >> <a

href=\"companies.aspx\">
>> Companies </a> >> " + getCategoryPath(nRequestedId);
>> Application["SitePath"] = SitePath.Text;
>> dlSubCategory.DataSource =
>> categories.getCompanySubCategories(Convert.ToInt32 (nRequestedId));
>> dlSubCategory.DataBind();
>> }
>> if(Request.QueryString["id"].ToString().StartsWith("X"))
>> {
>> Add.Visible = true;
>> Inquire.Visible = true;
>> phTools.Visible = true;
>> string nRequestedId = Request.QueryString["id"].Substring(1);
>> SitePath.Text = Application["SitePath"] + " > " +
>> getSubCategoryPath(nRequestedId);
>> Counter1.SubcategoryId = Convert.ToInt32(nRequestedId);
>> dsCompanies = categories.getCompanies(Convert.ToInt32(nRequested Id)); >> dlCompanies.DataSource = dsCompanies;
>> //categories.getCompanies(Convert.ToInt32(nRequested Id));
>> dlCompanies.DataBind();
>> }
>> }
>> else
>> {
>> SitePath.Text = "<a href=\"#\">Home</a> > <a href=\"companies.aspx\"> >> Companies </a>";
>> Add.Visible = false;
>> Inquire.Visible = false;
>> phTools.Visible = false;
>> DataTable dtCategory = new DataTable("table1");
>> DataTable dtSubCat = new DataTable("table2");
>> dtCategory = categories.getCompanyCategories().Tables[0];
>> dtSubCat = categories.getCompanySubCategories().Tables[0];
>> DataSet dsWhole = new DataSet("Companies");
>> dsWhole.Tables.Add(dtCategory.Copy());
>> dsWhole.Tables[0].TableName = "CompanyCategory";
>> dsWhole.Tables.Add(dtSubCat.Copy());
>> dsWhole.Tables[1].TableName = "CompanySubCategory";
>> DataColumn dtParent =

dsWhole.Tables["CompanyCategory"].Columns["CatId"];
>> DataColumn dtChild =
> dsWhole.Tables["CompanySubCategory"].Columns["CatId"];
>> DataRelation drPCRelation = new
>> DataRelation("CatSubCatRelation",dtParent,dtChild, false);
>> dsWhole.Relations.Add(drPCRelation);
>> dlCompCategory.DataSource = dsWhole.Tables["CompanyCategory"];
>> dlCompCategory.DataBind();
>> dsWhole.Dispose();
>> dtParent.Dispose();
>> dtChild.Dispose();
>> }
>> }
>> ********************
>>
>>
>
>



Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

145
by: David MacQuigg | last post by:
Playing with Prothon today, I am fascinated by the idea of eliminating classes in Python. I'm trying to figure out what fundamental benefit there is to having classes. Is all this complexity...
3
by: Dung Ping | last post by:
I posted same message three times to the forum. The first two times didn't show up. After posting the 3rd times, all three are displayed. I like to delete two of the three postings. If possible,...
2
by: tshad | last post by:
I want to be able allow our users to push buttons to show and hide hidden grids on my page. The problem is that each one of these pages gets put into the history. There is no need to go back, as...
4
by: _wolf | last post by:
hi all, this is a re-posting of my question i asked a month or so ago. i installed web.py, flups, and cheetah. when i copy'n'paste the sample app from then http://webpy.org homepage :: import...
43
by: balakrishnan.dinesh | last post by:
Hi all, Im working in javascript, I want to use Ajax in javcascript, Can u tel me how to use ajax in javascript, whether i have to include any code as like to include *css or *.js file, what are...
44
by: Bruce Wood | last post by:
This subject has come up several times in this group over the last year. Several people in this group seem to feel strongly about this topic. Rather than derail other threads with this discussion,...
36
by: Neil | last post by:
I received a message in another newsgroup saying that I shouldn't top-post my replies. I always top-post, because I feel it's easier for the reader to see the reply, rather than having to go to the...
1
by: davibugi | last post by:
I have some code for sending email from a form and it has some attachment The problem is at times it sends and at other times it fails to send what could the issues be and how do i fix it here is...
8
by: Andy B | last post by:
Before I do a no no on a newsgroup, I need to ask a question: What is the max number of lines of code you can/should post here before it gets too long?
1
Markus
by: Markus | last post by:
Before you post please: Turn on PHP Debugging Messages - this will help yourself and our experts to solve your problem. Please provide the error details in your post. Read the Posting...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.