Click here to Skip to main content
16,005,682 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionFinding Printer Status in ASP.NET 1.1 Pin
param thaker21-Sep-06 0:19
param thaker21-Sep-06 0:19 
QuestionAccessibility issue: Mouseover effect of image. Pin
narendra.vendi20-Sep-06 23:17
narendra.vendi20-Sep-06 23:17 
AnswerRe: Accessibility issue: Mouseover effect of image. Pin
Jakob Farian Krarup20-Sep-06 23:48
Jakob Farian Krarup20-Sep-06 23:48 
QuestionAccessibility issue: Alternate way for Close functionality Pin
narendra.vendi20-Sep-06 23:09
narendra.vendi20-Sep-06 23:09 
Questionasp.net question about database and refresh button Pin
Deepak the Cool20-Sep-06 22:43
Deepak the Cool20-Sep-06 22:43 
AnswerRe: asp.net question about database and refresh button Pin
abhi_viking20-Sep-06 23:07
abhi_viking20-Sep-06 23:07 
AnswerRe: asp.net question about database and refresh button Pin
Britney S. Morales21-Sep-06 4:08
Britney S. Morales21-Sep-06 4:08 
QuestionSimple Web User Control dynamic parts ... Pin
Oskars20-Sep-06 22:11
Oskars20-Sep-06 22:11 
Hi,
I am experienced in C#, but new in ASP.NET. I cannot understand Web page life cycle. If I understand correctly, Web page class is destroyed every time you press the button or something. So I store my properties in ViewState. but there is a problem. I use TextBox to get keyword, which I use for database records retrieval. When i retrieve database records I add dynamically new rows to table with hrefs.

private void LoadData()
{
baseTechPartArray mParts = DataBase3.Get_baseTechPartArray_By_Keyword(KeyWord);

for (int i = 0; i <= mParts.Count - 1; i++)
{
TableRow mRow = new TableRow();
TableCell cellPickup = new TableCell();
TableCell cellName = new TableCell();
TableCell cellCode = new TableCell();

mRow.Cells.Add(cellPickup);
mRow.Cells.Add(cellName);
mRow.Cells.Add(cellCode);

ContainerTable.Rows.Add(mRow);

LinkButton hrefName = new LinkButton();
hrefName.Text = mParts.Get(i).name;
hrefName.Attributes["record_id"] = mParts.Get(i).id.ToString();

LinkButton hrefCode = new LinkButton();
hrefCode.Text = mParts.Get(i).code;
hrefCode.Attributes["record_id"] = mParts.Get(i).id.ToString();

ImageButton mPickupButton = new ImageButton();
mPickupButton.BorderWidth = 0;
mPickupButton.ImageUrl = "../Resources/pickup.gif";

mPickupButton.Attributes["record_id"] = mParts.Get(i).id.ToString();

cellPickup.Controls.Add(mPickupButton);
cellName.Controls.Add(hrefName);
cellCode.Controls.Add(hrefCode);

mPickupButton.Click += new ImageClickEventHandler(mPickupButton_Click);
hrefCode.Click += new EventHandler(hrefCode_Click);
hrefName.Click += new EventHandler(hrefName_Click);

cellPickup.Attributes["width"] = "1%";
cellCode.Attributes["width"] = "30%";
}
}

but Click events does not work until I add Load() method to PageLoad or LoadViewState.
But then some of table rows are still from first page load, I try to clear them, but it does`nt help. What simple framework or principle should I use 1)to get work simple onevent -> 2)add dynamic elements with their events -> 3)use dynamically added control events?
AnswerRe: Simple Web User Control dynamic parts ... Pin
M LN Rao20-Sep-06 22:47
M LN Rao20-Sep-06 22:47 
GeneralRe: Simple Web User Control dynamic parts ... Pin
Oskars20-Sep-06 23:00
Oskars20-Sep-06 23:00 
GeneralRe: Simple Web User Control dynamic parts ... Pin
M LN Rao20-Sep-06 23:13
M LN Rao20-Sep-06 23:13 
QuestionAccessibility issue: Alternate way for Print functionality Pin
narendra.vendi20-Sep-06 21:21
narendra.vendi20-Sep-06 21:21 
Questionto merge dynamically.. Pin
shyamkrishnan20-Sep-06 21:00
shyamkrishnan20-Sep-06 21:00 
AnswerRe: to merge dynamically.. Pin
Guffa20-Sep-06 22:04
Guffa20-Sep-06 22:04 
GeneralRe: to merge dynamically.. Pin
shyamkrishnan22-Sep-06 0:31
shyamkrishnan22-Sep-06 0:31 
GeneralRe: to merge dynamically.. Pin
shyamkrishnan22-Sep-06 0:36
shyamkrishnan22-Sep-06 0:36 
AnswerRe: to merge dynamically.. Pin
Guffa22-Sep-06 7:54
Guffa22-Sep-06 7:54 
GeneralRe: to merge dynamically.. Pin
Vicky Roberts21-Sep-06 0:04
Vicky Roberts21-Sep-06 0:04 
QuestionPls help....................... Pin
hai2muru20-Sep-06 20:45
hai2muru20-Sep-06 20:45 
AnswerRe: Pls help....................... Pin
Sathesh Sakthivel20-Sep-06 20:48
Sathesh Sakthivel20-Sep-06 20:48 
QuestionAsp.net Security ---Preventing Reuse of Password [modified] Pin
Farid_200520-Sep-06 20:44
Farid_200520-Sep-06 20:44 
QuestionSaving data from any page Pin
Uma Kameswari20-Sep-06 20:29
Uma Kameswari20-Sep-06 20:29 
AnswerRe: Saving data from any page Pin
Jay_se20-Sep-06 20:56
Jay_se20-Sep-06 20:56 
AnswerRe: Saving data from any page Pin
zarkan21-Sep-06 4:46
zarkan21-Sep-06 4:46 
QuestionMysql Connection string Pin
kirthikirthi20-Sep-06 20:13
kirthikirthi20-Sep-06 20:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.