Visual Basic .NET » Internet / Hardware Communication
InterView Questions -- RaviKumar --

InterView Questions.

1.Can we use Application object in WebFarms?
2.Can we have a web-application without web.config?
3.Recommended way to release unmanaged resources?
4.Why Finalize() is not recommended?

Please share your answers.

Thanks & Regards Ravikumar.P

-- hemalsoni --

Hi Ravi Kumar,

I don't know abt Fist and 3'rd Question

But we can not run our application without web.config File in any web application. If u do it u will get an debug error.

and finaliza is not recommended becauz finalize method is invoked by the System.Gc.collect()
and it is not neccessory that every time the finalizw method will be invoked when the garbege collecter will dallocate the memmory of an object. So if u write the deallocation of an object in the finalize, that is not arequired that it will perfomed perfectly.

On 7/11/06, Ravi Kumar <ravi> wrote:

InterView Questions.

1.Can we use Application object in WebFarms?
2.Can we have a web-application without web.config?
3.Recommended way to release unmanaged resources?
4.Why Finalize() is not recommended?

Please share your answers.

Thanks & Regards
Ravikumar.P
>


 

-- sandeepspawar --


1. you can use application objects in webforms

e.g. on of the attribute of linkbutton....
onclick="javascript:Call_Search('<%=
Application
%>');"
2. it is not neccessary.

3. Answer ---- >>>
http://msdn2.microsoft.com/en-us/library/0s71x931.aspx 


-- SandeepPawar --

1. you can use application objects in webforms

e.g. on of the attribute of linkbutton....
onclick="javascript:Call_Search('<%=
Application
%>');"

2. it is not neccessary.

3. Answer ---- >>>
http://msdn2.microsoft.com/en-us/library/0s71x931.aspx 
>

-- RaviKumar --

Hi Sandeep Pawar 1.Application,Session objects in WebFarms not in WebForms.
Thanks Ravikumar.P

----- Original Message -----
From: Sandeep Pawar
To: TechdotNetIndia
Sent: Tuesday, July 11, 2006 1:03 PM
Subject:
Re: InterView Questions
1. you can use application objects in webforms

e.g. on of the attribute of linkbutton....
onclick="javascript:Call_Search('<%=
Application
%>');"
2. it is not neccessary.
3. Answer ---- >>>
http://msdn2.microsoft.com/en-us/library/0s71x931.aspx 





-- hemalsoni --

Hello Sandeep,
U Said that it is not necessary to use web.config in web application, but if i delete the web.config from my application then it gives an debugging error..

Can u explaing me how it is not neccesrry??
can u give me any Example of that?

Thanks Hemal.
On 7/11/06, sandeep.s.pawar <sandeep.s.pawar> wrote:


1. you can use application objects in webforms

e.g. on of the attribute of linkbutton....
onclick="javascript:Call_Search('<%=
Application
%>');"
2. it is not neccessary.

3. Answer ---- >>>
http://msdn2.microsoft.com/en-us/library/0s71x931.aspx 

>


 

-- STSreetharan --

I hope you tried running your application from Visual Studio, thats why it is giving errors. The lines written in msdn is, "If your application is not using any configurable sections other than default, it is not necessary to use web.config". so try accessing the application directly from web browser.
it will work

Regards Sreetharan S.T

-- hemalsoni --

Oh thanx for the reply,
I tried that and it is running fine, but if that is so then how can i make my dll of that application?? if i need to use that dll in an other project???

Please Reply..
Thanks in advance Hemal.
On 7/11/06, ST Sreetharan <stsree> wrote:

I hope you tried running your application from Visual Studio, thats why
it is giving errors. The lines written in msdn is, "If your application is
not using any configurable sections other than default, it is not necessary
to use web.config". so try accessing the application directly from web
browser. it will work

Regards
Sreetharan S.T

>


 

-- STSreetharan --

See there is no problem with the dll and all. see the dll is a seperate entity from configuration. this wont affect the dll. you can add reference to the dll and start using the classes and methods in the dll.

Regards Sreetharan S.T

-- RaviKumar --


Interview Questions:

1.One server textbox,required validator,two server buttons named
"OK","CANCEL" reply.
If you click OK then validation should be done,if you click CANCEL no validation.How will you do this?
----------------------------------------------------------------------------
-----------------------------------------------------------
2.
Class A
{
public void show()
{
}
}

Class B:Class A
{
public void show()
{
}
}
Question : How will you call Class A's 'show()' function
----------------------------------------------------------------------------
-----------------------------------------------------------
3.
class Test
{
public int show(int x)
{
Console.write("int method");
}
public float show(int x)
{
Console.write("float method");
}
public static void Main()
{
Test t=new Test();
int x= t.show(2);
float y=t.show(3);
}
}
Question:Whats is the result ?
----------------------------------------------------------------------------
-----------------------------------------------------------
4. What's the difference between XmlDocument.SelectNodes() &
XmlDocument.SelectSingleNode() in XML
----------------------------------------------------------------------------
-----------------------------------------------------------
5.
interface A
{
public void show();
}
class B:A
{
public void BShow()
{
}
public void show
{
}
}
Question : You need to call the function 'show()' but the instance should no expose the method 'BShow()' to the user.How wil you do this?.Note: fuction
'BShow()' always have the modifier public.

Thanks & Regards Ravikumar.P


-- RaviKumar --



----- Original Message -----
From: "Ravi Kumar" <ravi>
To: <TechdotNetIndia>
Sent: Monday, July 17, 2006 5:35 PM Subject:
Interview Questions

Interview Questions:

1.One server textbox,required validator,two server buttons named
"OK","CANCEL" reply.
If you click OK then validation should be done,if you click CANCEL no
validation.How will you do this?
--------------------------------------------------------------------------
-- 

-----------------------------------------------------------
2.
Class A
{
public void show()
{
}
}

Class B:Class A
{
public void show()
{
}
}
Question : How will you call Class A's 'show()' function
--------------------------------------------------------------------------
-- 

-----------------------------------------------------------
3.
class Test
{
public int show(int x)
{
Console.write("int method");
}
public float show(int x)
{
Console.write("float method");
}
public static void Main()
{
Test t=new Test();
int x= t.show(2);
float y=t.show(3);
}
}
Question:Whats is the result ?
--------------------------------------------------------------------------
-- 

-----------------------------------------------------------
4. What's the difference between XmlDocument.SelectNodes() &
XmlDocument.SelectSingleNode() in XML
--------------------------------------------------------------------------
-- 

-----------------------------------------------------------
5.
interface A
{
public void show();
}
class B:A
{
public void BShow()
{
}
public void show
{
}
}
Question : You need to call the function 'show()' but the instance should no
expose the method 'BShow()' to the user.How wil you do this?.Note: fuction
'BShow()' always have the modifier public.

Thanks & Regards
Ravikumar.P

>

 

-- BabuLives --


Hi Ravi,
Here is the answer of your Q's

Ansewers:
1)Set the CausesValidation = true;
2)base.Show()
3)Error: Type 'Test.Test' already defines a member called 'show' with the same parameter types 4)XmlDocument.SelectNodes(xpath)
This gives the list of nodes that satisfies the XPath expression u r givving as argument.
XmlDocument.SelectSingleNode(xpath)
This gives the first node that is satisfied by the xpath argument.
5)Pls explain clearly..i didnt get wat u want actually...
Regards,
Satheesh

-- RaviKumar --


Hi Satheesh,

interface A
{
public void show();
}
class B:A
{
public void BShow()
{
}
public void show
{
}
}
If you create a instance of class B then the object should not expose the method 'BShow()' to the user.
How will you do this?
Here see,
B b=new B();
then we can access the b.BShow() method,but the method BShow() should not be exposed to the user.

Thanks for your previous answers.

Please send me some OO questions only i will try to solve those.

Thanks & Regards Ravikumar.P


-- BabuLives --


sorry ans for 1 Q is CausesValidation = false

[Submit Comment]Home