Showing posts with label webpage. Show all posts
Showing posts with label webpage. Show all posts

Monday, March 26, 2012

Newbie ASP.Net-- how to use external assemblies?

I think (I know) I have a basic ASP.Net question. How can I use outside
components in an ASP.Net webpage? I know how to do it in ASP--
CreateObject() or CreateInstance() with the ProgID. However, I'm not sure
of ASP.Net's prefered way of going about the same task. A register
directive, maybe? TIA for pointing me in the right direction.
-JimYour question is confusing, because your title says "external assemblies"
and your message says "outside components." Assembly is a term for a .Net
assembly, while "outside components" is a generic term that could mean
anything from a C++ DLL to a COM object to a .Net assembly (no doubt I've
omitted a few other types of components).
If it's assemblies you want to use, just put them in your app's bin folder
and reference them. How you reference them depends upon your development
environment. If not .Net assemblies, you will need to use some form of
Interop, which is not a can of worms you should really want to open, unless
you absolutely have to.
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Jim Bancroft" <bobgambles@.nowhere.com> wrote in message
news:eFbzt5NoEHA.3396@.tk2msftngp13.phx.gbl...
> I think (I know) I have a basic ASP.Net question. How can I use outside
> components in an ASP.Net webpage? I know how to do it in ASP--
> CreateObject() or CreateInstance() with the ProgID. However, I'm not sure
> of ASP.Net's prefered way of going about the same task. A register
> directive, maybe? TIA for pointing me in the right direction.
> -Jim
>
Ok, I wasn't completely clear-- I've written a DLL in VB .Net, and I'd like
to access the contained components/objects from my ASP.Net pages. No
interop needed here. Could someone let me know how to go about accessing my
.Net components from within ASP.Net? Thanks again,
-Jim
"Kevin Spencer" <kspencer@.takempis.com> wrote in message
news:Oh%23MbZOoEHA.3460@.TK2MSFTNGP15.phx.gbl...
> Your question is confusing, because your title says "external assemblies"
> and your message says "outside components." Assembly is a term for a .Net
> assembly, while "outside components" is a generic term that could mean
> anything from a C++ DLL to a COM object to a .Net assembly (no doubt I've
> omitted a few other types of components).
> If it's assemblies you want to use, just put them in your app's bin folder
> and reference them. How you reference them depends upon your development
> environment. If not .Net assemblies, you will need to use some form of
> Interop, which is not a can of worms you should really want to open,
unless
> you absolutely have to.
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> I get paid good money to
> solve puzzles for a living
In Visual Studio under your project right click on references --> Add
Reference. You'll be presented with a dialog box and already on the .Net tab
(which contains a list of assemblies registered in the GAC). Click the brows
e
button and select the .Net DLL that you want to reference. Click Ok and voil
a
- you can now reference the classes exposed by that DLL in your web app.
-Demetri
"Jim Bancroft" wrote:

> Ok, I wasn't completely clear-- I've written a DLL in VB .Net, and I'd lik
e
> to access the contained components/objects from my ASP.Net pages. No
> interop needed here. Could someone let me know how to go about accessing
my
> ..Net components from within ASP.Net? Thanks again,
> -Jim
>
> "Kevin Spencer" <kspencer@.takempis.com> wrote in message
> news:Oh%23MbZOoEHA.3460@.TK2MSFTNGP15.phx.gbl...
> unless
>
>
Again, it depends upon your development environment. What would that be?
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
"Jim Bancroft" <bobgambles@.nowhere.com> wrote in message
news:eOIsM7OoEHA.2900@.TK2MSFTNGP12.phx.gbl...
> Ok, I wasn't completely clear-- I've written a DLL in VB .Net, and I'd
like
> to access the contained components/objects from my ASP.Net pages. No
> interop needed here. Could someone let me know how to go about accessing
my
> .Net components from within ASP.Net? Thanks again,
> -Jim
>
> "Kevin Spencer" <kspencer@.takempis.com> wrote in message
> news:Oh%23MbZOoEHA.3460@.TK2MSFTNGP15.phx.gbl...
assemblies"
.Net
I've
folder
> unless
>
Thanks, Demetri!
-Jim
"Demetri" <Demetri@.discussions.microsoft.com> wrote in message
news:C4E35F5B-3542-43A4-ADBE-857AF80CE8E7@.microsoft.com...
> In Visual Studio under your project right click on references --> Add
> Reference. You'll be presented with a dialog box and already on the .Net
tab
> (which contains a list of assemblies registered in the GAC). Click the
browse
> button and select the .Net DLL that you want to reference. Click Ok and
voila
> - you can now reference the classes exposed by that DLL in your web app.
> -Demetri
>

Newbie current Page link Question

I everyone just wondering how i can pull out the current page link in the code behind page.

Ie say my website is:http://www.webpage.com/index.aspx

so say i am inside this page how do i extract the full link "http://www.webpage.com/index.aspx" to make it availabe to the page that is index.aspx

Hope i am making some sense

Kevin

Hi,

would Request.Urlhelp you?

Saturday, March 24, 2012

Newbie help Webpage that pings servers and returns if it is up.

I want to create a web page that will ping a server an return a if the machine is up.
If it is up i want it to change an image to another image to tell me the server is down.
Can anyone help?You could use something like:
try {

WebRequest test = WebRequest.Create("http://www.domain.com");

//display "up" image

} catch ( Exception e ) {

//display "down" image
}

For more information on System.Net.WebRequest use the link below (.NET Class Library) and in the left frame go to System.Net -> WebRequest.
Hey thanx for the replay but im new to this stuff is there anyway you could give me a little more info?

Friday, March 16, 2012

newbie postback question about ASP controls

Do I understand correctly that my aspx webpage's DataGrid, Button and web
control states are somehow stored in the "_VIEWSTATE" hidden input value,
making it unneccesary to recreate their content in the case of page
postbacks? Or are there gotchas I need to look out for in assuming these
controls will work correctly, and have their former values available, after
a postback?
Thanks,
JimHi Jim,
You are correct for your server controls. The ones that start <asp:...>.
You can also add your HTML control to the _VIEWSTATE by giving them the
runat="Server" attribute. For example: <input type="hidden" id="hidValue"
runat="server"> will add this control to view state and it will retain its
value between postbacks. Good luck! Ken.
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
"Jim Bancroft" <bobgambles@.nowhere.com> wrote in message
news:epGzj$koEHA.3668@.TK2MSFTNGP15.phx.gbl...
> Do I understand correctly that my aspx webpage's DataGrid, Button and web
> control states are somehow stored in the "_VIEWSTATE" hidden input value,
> making it unneccesary to recreate their content in the case of page
> postbacks? Or are there gotchas I need to look out for in assuming these
> controls will work correctly, and have their former values available,
after
> a postback?
> Thanks,
> Jim
>
Thanks for the explanation and help, Ken! Good stuff below.
-Jim
"Ken Dopierala Jr." <kdopierala2@.wi.rr.com> wrote in message
news:%23FEbSHloEHA.2864@.TK2MSFTNGP12.phx.gbl...
> Hi Jim,
> You are correct for your server controls. The ones that start <asp:...>.
> You can also add your HTML control to the _VIEWSTATE by giving them the
> runat="Server" attribute. For example: <input type="hidden"
id="hidValue"
> runat="server"> will add this control to view state and it will retain its
> value between postbacks. Good luck! Ken.
> --