I have:
But nothing shows in the control :(VB Code:
literal1.ResolveURL("Woof.aspx")
WOka
Printable View
I have:
But nothing shows in the control :(VB Code:
literal1.ResolveURL("Woof.aspx")
WOka
Nothing shows as that function has nothing to do with what I want. Hahaha.
Boooo...OK, does anyone know the correct function for this?
WOka
Use an IFRAME
any examples of code?
this.Literal1.Text= "<iframe height=500 width=500 src='http://www.vbfourms.com'></iframe>";
Hope it helps.
Yup. Spot on cheers, just what I wanted :D
But that's c#.net isn't it?
for VB it's almost the same just minus the ;
I'm splitting hairs. Bad Woka *slap*VB Code:
Literal1.Text= "<iframe height=500 width=500 src='http://www.vbfourms.com'></iframe>"
So, here's the big question. If you were writing a portal would u show the pages (components) of the portal like that?
Woof
No, I wouldn't.
I'd make a web user control and include that in my page.
So, you''d have a web user control and then pass some values to some custom functions?
Inside the control would you use an Iframe?
Woof
OK. This is the test app I have been playing with.
The idea is that the buttons (or links) will be DB driven, for different components/apps that get installed on the portal.
The params code is rough, in fact the whole things rough, but it's only demoing a concept and is not actual production code.
SO, if you were writing a portal would this be a good start?
Woka
I am not sure what you are requirements are, but i would suggest you have a look at DotNetNuke Portal. Its open source and written in VB.Net. We have just started using it at work and I have written plugins/modules to extend its functionality to met our business needs. It has been creted with the co-opertion of MS and endorsed by MS too. Its worth a look i would say if you are planning to write a portal. You may be able to use its core functionality and simply extend it to meet your needs.
http://www.dotnetnuke.com/
Have looked at that in the past, but not recently. Admittedly, when I have looked at it in the past my knowledge of .NET was no where near what it is now, so I found it extremelt confusing and complicated.
Installing it again now.
OK. IMO I don't like using IFrames :(
Regardless, of where this is right or wrong, does anyone know how to put the web page into a literal control without using iframes...so that when I do a view source I see the entire source, and not just that for the Main.aspx page.
Woka
Yes its a bit confusing intially, once you spend some time and get your head around it, its not really that complex. Also you dont need to understand how it works 100%, you just need to know how you can create Modules and intigrate it to DNN. I have written step by step guide, I will post it when you get to that part.Quote:
Have looked at that in the past, but not recently. Admittedly, when I have looked at it in the past my knowledge of .NET was no where near what it is now, so I found it extremelt confusing and complicated.
Installing it again now.
Same here, i had found many disadvantages.Quote:
OK. IMO I don't like using IFrames :(
Regardless, of where this is right or wrong
Here is how i would get the source and place it into a literal control. Its in C# if you have problem converting it let me know :)Quote:
does anyone know how to put the web page into a literal control without using iframes...so that when I do a view source I see the entire source, and not just that for the Main.aspx page.
Woka
Code:public static string GetSource(string webAddress)
{
try
{
WebRequest WReq = WebRequest.Create(webAddress);
WebResponse WResp = WReq.GetResponse();
// get the stream of data
StreamReader sr = new StreamReader(WResp.GetResponseStream(), Encoding.ASCII);
string strTemp = "";
strTemp = sr.ReadToEnd()
sr.Close();
}
catch (WebException WebExcp)
{
//MessageBox.Show(WebExcp.Message);
}
return strTemp;
}
I dont have an answer for you, but why don't u try using placeholders and user controls? They are easy to work with and simple to design...
I am :D
How on earth do you get DotNetNuke to install the DB and all the SPs etc?
I can't find any documentation anywhere....Aghhhh. It's just been one of those days :(
Woof
Danial, sorry, no idea what those objects are in VB :(
Have tried searching, but to no avail.
Woka
First time I tried installing DNN it took me 3 days of trying to install itQuote:
Originally Posted by Wokawidget
:rolleyes:.
The documentation is in your C:\DotNetNuke\Documentation\Public\DotNetNuke Installation Guide.pdf folder.
Make sure you create the DB with Proper Permission and Specify your ServerName, Username and Password details in the Web.Confi File, before you start your installation. The Element Name is "SiteSqlServer" in the web.config that you need to modify.
What error are you getting?
As for getting the source here is a similar code in VB.Net http://www.vbforums.com/showthread.p...ght=webrequest
Right, got it working :D
Found the documentation after I posted. D'oh!
What I was doing wrong was something to do with SQL server permissions for the user Woof.
In the end I just changed the login to use SA and then it installed everything.
Having a play now.
Can't get it to run in .NET IDE as it says I am not allowed to debug. I have had this error before on other apps, but have forgotten what needs doing.
I know Debug needs to = True in the config section, but it does.
woof
You dont have VS.Net 2005 by any chance do you?If so then make sure your application is using Framework Version 1.1xx isntead of 2.xxx, you can specify that in the IIS by clicking on Property of the IIS Application.
Also make sure Debug is enabled in the Project itself. You can check it by Right Clicking on Individual Project with-in your solution (in your case "DotNetNuke") and slecting "Configuratin Properties" and make sure "ASP.Net Debugging" is checked.
These are 2 possible reasons why you are not able to debug in the .Net IDE.
Hope it helps.
OK...played with Nuke a bit.
Still can't convert your C# code :( I suck. Can I ask for some help?
What do you know about MaterPages?
Woka
Ofcourse, here is the VB.Net version, just put a button and a Literal control on your form.Quote:
OK...played with Nuke a bit.
Still can't convert your C# code :( I suck. Can I ask for some help?
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim StrURL As String = "http://www.vbforums.com" Dim objRequest As WebRequest = WebRequest.Create(StrURL) Dim objResponse As WebResponse = objRequest.GetResponse() Dim strmReader = New StreamReader(objResponse.GetResponseStream()) Dim strContent As String = strmReader.ReadToEnd() Me.Literal1.Text = strContent End Sub
I have read about MasterPages, but have never actualy used them. According to my understanding MasterPage is a sort of Template which you can design in asp.net 2.0 and then use that your base page. This will allow you to design a look and feel of your site once and then simply use that same design in every page. A kind of like a skin in DotNetNuke...Quote:
What do you know about MaterPages?
I havent done much asp.net 2.0 yet, only tried with the new IDE when VS.Net 2005 expresss came out. Just got my VS.Net 2005 Beta 2 CD on the post yesterday, will install it soon and start using it. Heard a lot of good things specially for VB.Net users.
What is that you want to know about MasterPages?
Hope it helps.
You've told me enough :D
I don't have the Beta 2 on my PC. Not sure if I should put it on and develop in that or stick with 2003. What do you think?
Cheers for the VB code :)
One problem I have found with this is that it requires a virtual directory...would it be possible to have a folder with a web page in it, which would be relative to the root of my main aspx page, or would I need a Virtual Directory?
Woka
:thumb:Quote:
You've told me enough :D
I have VS.Net 2002, 2003 and 2005 beta running side by side without any problem on my home machine. Only issue is when creating asp.net application you manually need to specify that you are using Framework Version 1.1 if you are not using VS.Net 2005 thats all. You can easily do that in IIS. I havent isntalled it in my work PC yet, i will wait for a while befor I do that :).Quote:
I don't have the Beta 2 on my PC. Not sure if I should put it on and develop in that or stick with 2003. What do you think?
You are very welcome.Quote:
Cheers for the VB code :)
I assumed the page you are reading were from external source thats why I suggested WebRequest. For that yes they will need to be in a virtual directory with a fully formed URL or IP.Quote:
One problem I have found with this is that it requires a virtual directory...would it be possible to have a folder with a web page in it, which would be relative to the root of my main aspx page, or would I need a Virtual Directory?
Woka
What exactly are you trying to do? Are you loading aspx pages(Created by You) within your project? If so then simply create them as Web User Control (ascx) and use LoadControl to load them into a Literal Control at runtime rather then using WebRequest code I gave you. That will far more efficient and you would not need virtual folder, just the path of the .ascx file. I posted an example on this forum, just look few thread down you will see. If not I will post an example tomorrow..
You could try LoadControl on .aspx page, but i dont know if it will work as i have never tried them :).
Hope it helps.
Apologies if I mislead you. Didnt read your first few post properly..
Good luck, time for bed :eek: :wave:
Nope you didn't mislead me. You gave me answers to the questions I ask. Sometimes it's good for people to make their own mistakes and go down the wrong road now and again.
So hmmmm, loadings web controls, that's how MaterPages works doesn't it???
I am writting a portal, but I wanted to try out many ways of of achieving this, and their pros and cons.
Woka
Totally agree...Quote:
Sometimes it's good for people to make their own mistakes and go down the wrong road now and again.
I have not looked at the innerworking of masterPage, but in essence it is simply a aspx page which contains a <Form> tag, and when you include it in your page, all additional html and controls are added between the <form></form> tag. You would not be able to modify the MasterPage only the ChildPage.Quote:
So hmmmm, loadings web controls, that's how MaterPages works doesn't it???
I am writting a portal, but I wanted to try out many ways of of achieving this, and their pros and cons.
For your case LoadControl method will be the most efficient and the correct way to use. I think even DotNetNuke uses LoadControl for their Portal.
I will try put together an example of LoadControl, if I get a chance in few hours or when I get home.
Here are few examples I found on the net which might be helpful.
http://aspalliance.com/565
http://www.codeproject.com/aspnet/Lo...SerControl.asp
Hope it helps.
Woka here is an simple example of Loading control dynamically.
Hope it helps.