Click here to Skip to main content
15,908,775 members
Home / Discussions / C#
   

C#

 
GeneralRe: DataGrid TableStyles Pin
Kodanda Pani15-Mar-05 18:06
Kodanda Pani15-Mar-05 18:06 
GeneralRe: DataGrid TableStyles Pin
dennista16-Mar-05 3:31
dennista16-Mar-05 3:31 
GeneralFile IO in Webservice gives Error Pin
James Poulose15-Mar-05 8:21
James Poulose15-Mar-05 8:21 
GeneralRe: File IO in Webservice gives Error Pin
TylerBrinks15-Mar-05 9:46
TylerBrinks15-Mar-05 9:46 
QuestionHow to create a shallow copy of List<T> ? Pin
Andres Coder15-Mar-05 7:50
Andres Coder15-Mar-05 7:50 
AnswerRe: How to create a shallow copy of List<T> ? Pin
leppie15-Mar-05 8:51
leppie15-Mar-05 8:51 
GeneralSending a web form as parameter Pin
see0715-Mar-05 7:45
see0715-Mar-05 7:45 
GeneralRe: Sending a web form as parameter Pin
Pushkar Pathak15-Mar-05 18:16
Pushkar Pathak15-Mar-05 18:16 
Hey u raised the simplest inheritance question possible

All your windows forms in C# or .Net rather inherit from a common base class which System.Windows.Forms so whether u want to send webForm1 or webForm2 or .... webFormn u can do it passing it as a base class and then later converting it into the derived class and by performing a runtime check

I dont have the visual studio while writing this, so there might be some error in the code that I write in here but u will get a general idea

using System.Windows.Form;
public static bool Hay_PostBack(System.Windows.Forms.Form parent1, string w1,
string w1cx,
string w1ID,
string w2,
string w2cx,
string w2ID)
{
if(parent1.GetType().ToString() == "WUC_CreDes.WebForm1")
{
WUC_CreDes.WebForm1 frm = (WUC_CreDes.WebForm1)parent1;
if (frm!=null) frm.Do_Something();
}
else if (parent1.GetType().ToString() == "WUC_CreDes.WebForm2")
{
WUC_CreDes.WebForm2 frm = (WUC_CreDes.WebForm2)parent1;
if (frm != null) frm.Do_Something();
}
}

and there you are .... that should kinda solve your query .... if theres any problem with that one write me back .... Since I dont VS.Net right now there might be syntax errors in what I typed but if i finc some I ll key in another reply



Pushkar Pathak
GeneralRe: Sending a web form as parameter Pin
see0716-Mar-05 11:59
see0716-Mar-05 11:59 
GeneralRe: Sending a web form as parameter Pin
see0722-Mar-05 7:00
see0722-Mar-05 7:00 
GeneralRe: Sending a web form as parameter Pin
see0722-Mar-05 12:20
see0722-Mar-05 12:20 
GeneralSystem.Timers problem Pin
sjhart15-Mar-05 7:17
sjhart15-Mar-05 7:17 
GeneralRe: System.Timers problem Pin
TylerBrinks15-Mar-05 8:20
TylerBrinks15-Mar-05 8:20 
GeneralPassing Safearray parameter to WebBrowser COM component Pin
simcho9915-Mar-05 3:45
simcho9915-Mar-05 3:45 
QuestionHow to show a child form when parent form is busy? Pin
oohungoo15-Mar-05 3:25
oohungoo15-Mar-05 3:25 
AnswerRe: How to show a child form when parent form is busy? Pin
tdciDoug15-Mar-05 4:22
tdciDoug15-Mar-05 4:22 
GeneralRe: How to show a child form when parent form is busy? Pin
oohungoo15-Mar-05 19:18
oohungoo15-Mar-05 19:18 
AnswerRe: How to show a child form when parent form is busy? Pin
James Poulose15-Mar-05 8:24
James Poulose15-Mar-05 8:24 
GeneralPivot table in .net Pin
Prabhakar.A15-Mar-05 3:20
Prabhakar.A15-Mar-05 3:20 
GeneralRe: Pivot table in .net Pin
Ravindra Sadaphule15-Mar-05 5:33
Ravindra Sadaphule15-Mar-05 5:33 
GeneralRe: Pivot table in .net Pin
Prabhakar.A15-Mar-05 19:50
Prabhakar.A15-Mar-05 19:50 
GeneralReflex between objects! Help! Pin
oohungoo15-Mar-05 3:15
oohungoo15-Mar-05 3:15 
GeneralRe: Reflex between objects! Help! Pin
mav.northwind15-Mar-05 4:32
mav.northwind15-Mar-05 4:32 
GeneralTake this as challenging task for smart device application Pin
sivaji raju15-Mar-05 2:31
sivaji raju15-Mar-05 2:31 
GeneralComboBox Pin
Bahadir Cambel15-Mar-05 2:29
Bahadir Cambel15-Mar-05 2:29 

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.