|
I think ComponentOne has their own Forum. pleaes Post it here
http://helpcentral.componentone.com/CS/forums/[^]
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
if (FileUpload1.HasFile == true)
{
FileUpload1.SaveAs(Server.MapPath("~/AdminSection/Attachment/"+FileUpload1.FileName.ToString()));
}
hi,
anybody knows, what may be the possibility by which this condition alwz return false.
|
|
|
|
|
did you put it in update panel ?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
i recently see the code:
lock(obj)
{
...
System.Threading.Monitor.PulseAll(obj);//is it need?
}
i want to konw the sentence is need?
|
|
|
|
|
|
I have create a dynamic menu but problem is that how we give for a page link in clildnodes.
my code is attached in code block-
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class top : System.Web.UI.Page
{
SqlConnection conn;
DataUtility dut = new DataUtility();
protected void Page_Load(object sender, EventArgs e)
{
PopulateMenu();
}
private void PopulateMenu()
{
DataSet ds = GetDataSetForMenu();
Menu menu = new Menu();
menu.MenuItemClick += new MenuEventHandler(menu_MenuItemClick);
foreach (DataRow parentItem in ds.Tables[0].Rows)
{
MenuItem categoryItem = new MenuItem((string)parentItem["Catname"]);
menu.Items.Add(categoryItem);
foreach (DataRow childItem in parentItem.GetChildRows("Children"))
{
MenuItem childrenItem = new MenuItem((string)childItem["Subcatname"]);
categoryItem.ChildItems.Add(childrenItem);
}
}
Panel1.Controls.Add(menu);
Panel1.DataBind();
}
void menu_MenuItemClick(object sender, MenuEventArgs e)
{
string selected = e.Item.Text;
Response.Write(selected);
}
private DataSet GetDataSetForMenu()
{
conn = dut.getConnection();
SqlDataAdapter adCat = new SqlDataAdapter("SELECT tbl_Category.* FROM tbl_Category,tbl_Usercat where tbl_usercat.uid=1 and tbl_Category.sno=tbl_Usercat.catid", conn);
SqlDataAdapter adProd = new SqlDataAdapter("SELECT tbl_SubCategory.* FROM tbl_SubCategory,tbl_UserSubcat where tbl_UserSubcat.UID=1 and tbl_SubCategory.sno=tbl_UserSubcat.SubCatid", conn);
DataSet ds = new DataSet();
adCat.Fill(ds, "tbl_Category");
adProd.Fill(ds, "tbl_SubCategory");
ds.Relations.Add("Children", ds.Tables["tbl_Category"].Columns["sno"], ds.Tables["tbl_SubCategory"].Columns["CatID"]);
return ds;
}
}
so plz help me soon.
thanks
vivek
|
|
|
|
|
Thats the 4th post and i given you a hint what to do.
that needs to be in Foreach loop.
MenuItem subItem = new MenuItem();
subItem.Text = parentItem["Catname"].ToString();
subItem.MenuItemClick += new MenuEventHandler(menu_MenuItemClick);
menu.Items.Add(subItem);
Edit: That is yust a sample. I saw you have 3 foreach. Each MenuItem needs to have click event. Don't worry if it is same method(Function).
|
|
|
|
|
Hi,
I want to import excel data into the database and also update that excel data using asp.net in c#.
I tried import the excel files but sometime the data is ecel file is not read.
Just because there is no single quote at the begining of each record.
How to solve this issue??
|
|
|
|
|
Hi,
Can you explain that how you reading the data from excel file using odbc or using COM objects..
Please put you code sample here.
Hope I can help you..
Be an Eagle, Sky is Yours.
|
|
|
|
|
I have create a dynamic menu but problem is that how we give for a page link in clildnodes.
my code is like that---------------------------------------------
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class top : System.Web.UI.Page
{
SqlConnection conn;
DataUtility dut = new DataUtility();
protected void Page_Load(object sender, EventArgs e)
{
PopulateMenu();
}
private void PopulateMenu()
{
DataSet ds = GetDataSetForMenu();
Menu menu = new Menu();
menu.MenuItemClick += new MenuEventHandler(menu_MenuItemClick);
foreach (DataRow parentItem in ds.Tables[0].Rows)
{
MenuItem categoryItem = new MenuItem((string)parentItem["Catname"]);
menu.Items.Add(categoryItem);
foreach (DataRow childItem in parentItem.GetChildRows("Children"))
{
MenuItem childrenItem = new MenuItem((string)childItem["Subcatname"]);
categoryItem.ChildItems.Add(childrenItem);
}
}
Panel1.Controls.Add(menu);
Panel1.DataBind();
}
void menu_MenuItemClick(object sender, MenuEventArgs e)
{
string selected = e.Item.Text;
Response.Write(selected);
}
private DataSet GetDataSetForMenu()
{
conn = dut.getConnection();
SqlDataAdapter adCat = new SqlDataAdapter("SELECT tbl_Category.* FROM tbl_Category,tbl_Usercat where tbl_usercat.uid=1 and tbl_Category.sno=tbl_Usercat.catid", conn);
SqlDataAdapter adProd = new SqlDataAdapter("SELECT tbl_SubCategory.* FROM tbl_SubCategory,tbl_UserSubcat where tbl_UserSubcat.UID=1 and tbl_SubCategory.sno=tbl_UserSubcat.SubCatid", conn);
DataSet ds = new DataSet();
adCat.Fill(ds, "tbl_Category");
adProd.Fill(ds, "tbl_SubCategory");
ds.Relations.Add("Children", ds.Tables["tbl_Category"].Columns["sno"], ds.Tables["tbl_SubCategory"].Columns["CatID"]);
return ds;
}
}
so plz help me soon.
thanks
vivek
|
|
|
|
|
How many times will you create this thread. This is already 3rd time within 24 hours on this forum. Also put your code in code block: <pre></pre>.
For each menu and sub menu add event click. you can assign to same event to same method, and then in event method handle your request
modified on Saturday, August 22, 2009 1:54 AM
|
|
|
|
|
Hi I want source code c++ language modify to xml in c#. I want example. please help me thank.
|
|
|
|
|
I do not understand your question, please explain
|
|
|
|
|
I am making a program were you type in your Xbox LIVE gamertag and it retrieves the info about it. I have most of it set up, but one thing I would like is to check if it exists or not. If you go to "http://live.xbox.com/en-US/profile/profile.aspx?pp=0&GamerTag=???" and replace the ??? with the textBox1 input, then if it exists, it takes you to the info. But, if it doesn't exist, it will still load the page like it exists, but then it will redirect to "http://live.xbox.com/en-US/profile/invalid.aspx". Is there a way to detect this redirection?
Also, I would like to retrieve some text on a certain location of a web page, could someone show how that is done?
modified on Friday, August 21, 2009 11:42 PM
|
|
|
|
|
without javascript, i don't think that was possible. You coud try holding session data and inside you woud have variable that holds the pages visited
|
|
|
|
|
Hello
I'm trying to acceed the combobox property of a datagridview combobox column
I can do it using the EditingControlShowing event
private void DgvKeys_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (noEvent)
{
return;
}
ComboBox combo = e.Control as ComboBox;
}
But I need to acceed directly any combo in some column without having to waint an event on it !
To set the combo selected intex for example
I was trying this but it does not work !
DataGridViewComboBoxColumn cby;
cby = (DataGridViewComboBoxColumn)DgvKeys.Columns["Region"];
cby.SelectedIndex = cby.FindStringExact(combo.Text);
Any idea ?
|
|
|
|
|
baranils wrote: I was trying this but it does not work !
Can you describe in more detail the circumstances when you would want to do this?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thank you Henry
"Can you describe in more detail the circumstances when you would want to do this?"
Good question !
I have three combobox column on single row (one and only one)
Those three combo are binded to three different tables
There is a logical relation berween those tables
If the user select a value in the third combo I want to show the related value in the first and second cell
So I'm trying to force the values of two cell but it doesn't work
I'm trying this
If I change the appellation Column
Pays must shows "France"
And Region must Show "Bordeaux"
But Pays remain empty !!
I thought it was because I also have to change the selected item of the combo ??
private void DgvKeys_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
if (noEvent)
{
return;
}
ComboBox combo = e.Control as ComboBox;
if (combo != null)
{
combo.DropDownStyle = ComboBoxStyle.DropDown;
combo.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
combo.AutoCompleteSource = AutoCompleteSource.ListItems;
combo.SelectedIndexChanged -= new EventHandler(ComboBox_SelectedIndexChanged);
combo.SelectedIndexChanged += new EventHandler(ComboBox_SelectedIndexChanged);
}
}
private void ComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
noEvent = true;
ComboBox combo = (ComboBox)sender;
if (combo.SelectedItem == null)
{
return;
}
DataRowView cRowV = (DataRowView)combo.SelectedItem;
DataRow cRow = cRowV.Row;
if (combo.DisplayMember == "Appellation")
{
DgvKeys.Rows[0].Cells["Pays"].Value = "France";
DgvKeys.Rows[0].Cells["Region"].Value = "Bordeaux";
curApel = cRow["Appellation"].ToString();
curApelID = Tools.GetInt(cRow["ApelID"]);
noEvent = false;
return;
}
}
|
|
|
|
|
Hello !
I've just finded out that a part of the problem seems to come because I've defined a Value Member to my ComboboxColumn
If I remove the assignation of the valuemember I can force the value of the cell without problem ???
|
|
|
|
|
Hello,
I am wondering if there is some functionality with the upper right exit button when it is pushed. I need to do a check to make sure that a button was pushed (save button) before they close the browser. I wasn't sure if there was some code I could run in the code behind to do this or not. Thanks!
John Michael
|
|
|
|
|
|
hi.i want copy database files.when i do detach database throw exeption.i search web and find things.but i cant drive result.
please help me.thanks.
string ConnStr = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\mydb.mdf"
+";Integrated Security=True;User Instance=True";
SqlConnection mycon = new SqlConnection(ConnStr);
SqlCommand mycom = new SqlCommand("sp_detach_db @d=db_name()", mycon);
mycon.Open();
mycom.ExecuteScalar();
mycon.Close();
|
|
|
|
|
Try these:
string ConnStr = @"Data Source=.\SQLEXPRESS;Database=Master;Integrated Security=True";
SqlConnection mycon = new SqlConnection(ConnStr);
SqlCommand mycom = new SqlCommand("sp_detach_db", mycon);
mycom.CommandType= CommandType .StoredProcedure ;
mycom.Parameters.Add(new SqlParameter("@dbname", SqlDbType.NVarChar,50));
mycom.Parameters["@dbname"].Value = "mydb";
mycon.Open();
mycom.ExecuteScalar();
mycon.Close();
|
|
|
|
|
What was not pointed out is that you cannot detach a database the your using. You have to execute the detach sp connected to the master db in SQL Server.
|
|
|
|
|
How can you add the usual AssemblyInfo data (version etc) to a Message Resource file?
I have a Message resource DLL - created via the method described in article "Using MC.exe, message resources and the NT event log in your own projects" (by Daniel Lohmann) How do I get version info into that DLL?
|
|
|
|