|
Guffa,
This was the answer I needed - works a treat!
Thanks for your help.
Jell
Jell
|
|
|
|
|
Hey guys I have to get the basics of asp using vb.net within the next 3 days...I should be able to do it...I have learned 12+ languages, and I already know VB.Net...Im just having some trouble with designing the forms, How do I place controls where I want them? If you have any sugestions please let me know.
Thank You!
Pablo
Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
|
|
|
|
|
When you are looking at your website in the designer (the .aspx not the .aspx.vb) you can look at either the design or the source. You can toggle between the two views by clicking on either "design" or "source" at the bottom left of the screen. The source view shows the html of the page. You will want to use html to create tables to oranize your controls on the page.
Here are some sites that might help you with html:
The Bare Bones Guide to HTML[^]
Tables in HTML Documents[^]
HTML Tag Quick Reference[^]
|
|
|
|
|
Polymorpher wrote: I have to get the basics of asp using vb.net
You can't do asp with VB.NET, you can however use it for asp.net
I'd recommend this book Teach Yourself ASP.NET in 24 Hours[^]
Then you would have two whole days to read How to get an answer to your question
3. Keep the subject line brief, but descriptive. eg "File Serialization problem"
only two letters away from being an asset
|
|
|
|
|
LOL, sry about that...guess I got in a bit of a rush. Thanks for the link, this looks like what I'm looking for.
Pablo
Sometimes I think there's no reason to get out of bed . . . then I feel wet, and I realize there is.
|
|
|
|
|
Does anyone know where I can find sample master pages ?
Its more the look & feel that I'm trying to find - I'm OK with producing the code, its the colors, fonts & icons that I always have problems with.
Thanks
|
|
|
|
|
|
Hello,
I am trying to create a custom email class but this one is the first class I create.
Where can I find some tips of how to create classes?
I have various problems. For example, there are properties which, when not defined by the user it won't be used on my code:
Public WriteOnly Property Priority() As System.Net.Mail.MailPriority
Set(ByVal value As System.Net.Mail.MailPriority)
If _Priority = value Then
Return
End If
_Priority = value
End Set
End Property
Is the user doesn't set Priority then in my function I will not have:
email.Priority = ...
Of course I could use an IF condition around "email.Priority = ..." but I am not sure if that's the way.
Thanks,
Miguel
|
|
|
|
|
Set Priority = System.Net.Mail.MailPriority.Normal as the default and use it regardless of whether the user sets it differently.
only two letters away from being an asset
|
|
|
|
|
Another way you could handle this situation is to not have priority as a property but as an optional parameter for the method or function that ends up actually sending the email. Optional parms have to the last parms of the method and have to have a default set. The method header would look something like this:
Public SendMyEmail(ByVal strEmailMessage as String, Optional ByVal strPriority as System.Net.Mail.MailPriority = Net.Mail.MailPriority.Normal)
(Of course, you would probably have a number of other parms before the optional one like who the email is to be sent to, from, CC, BCC, and so on.)
Hope this gives you some ideas to work from.
|
|
|
|
|
i installed an asp.net application onmy machine and tested it and works fine it connected to my access database and retrieve the files correctly. but when i tried to access the website from another machine this works ok too except when i try to connect to the database to capture data i get the following error
Exception Details: System.Data.OleDb.OleDbException: Cannot open database, it may not be a database that your application recognizes, or the file may be corrupt
the source error: points to my code that connects to my password protected database and retrieves soem data
???? is it that i need to try and instal mdac on the pc i am using to browse via the network ????
kenny
|
|
|
|
|
Hello,
I want to send a HTML page of my web site by email.
Is this possible in Asp.Net 2.0?
Thanks,
Miguel
|
|
|
|
|
Use the page's RenderControl method:
System.Text.StringBuilder builder = new System.Text.StringBuilder();<br />
System.IO.StringWriter writer = new System.IO.StringWriter(builder);<br />
HtmlTextWriter html = new HtmlTextWriter(writer);<br />
RenderControl(html);
This places the page's HTML into the StringBuilder variable, builder. The string can then be set as the body of your email message. Please note, however, that if there are any relative references (such as to a style sheet or an image or a link to another page) you will need to convert them to fully qualified URLS.
|
|
|
|
|
I have an application written in C# with SQL server Dbase . Would like to convert the same application to Web Enabled as ASP.NET without having to Re-write the code again in ASP.NET . Can anyone help in that ?
UnitecSoft
We will Either Find A Way , Or We Will Make One .
|
|
|
|
|
ASP.NET provides just the framework to provide a web interface for your application. Your application is written in C#, the language, which is independent of how the application presents itself to the outside world.
If you have designed your application properly by separating out the presentation layer from the business logic and database layers then it should be easy to replace the front end your application currently has with an ASP.NET front end.
The bottom line is that you will have to write some ASP.NET code, but this will be in addition to what is already there.
If you have designed your application badly then you will have to re-write it and no one can help you with that.
|
|
|
|
|
Thanx for your response , I believe the application is written in a good structure , UI is seperate from the business logic because it already written for two user langauges with same functions on same froms , just the UI can be swaped ( Hot swap ) while the application is running to show english language UI Or right side language UI . events in all controls do not contain business code , they tend to call functions or methods carrying that code , no control event holds more than one line of code .
May be the reason of my quastion is that I am starting web applications for the first time with ASP.NET .
UnitecSoft
|
|
|
|
|
can anyone of you direct me to a tutorial to do this.
thanks
|
|
|
|
|
:|How to use asp:radio button control in datagrid without any postback and
whenever I check first radio button in first row of grid, none other should be checked. If second RDB in second row of grid is checked, first should be unchecked.
can somebody suggest for this code?........Please
Balasaheb
|
|
|
|
|
Hi All,
I am unable to display an image in mozilla, when i give the path as "drive:/folder1/abc.jpg". any solution plz?
I tried both:
src="file:///D:/sweets/MHCPNWWebApp/Images/prod_img04.jpg" and also src="D:/sweets/MHCPNWWebApp/Images/prod_img04.jpg"
In both the case the image is not displayed in Mozilla or Firefox..
But when the image path is directly typed in browser image gets displayed..
need help please...
|
|
|
|
|
The image is only displayed when you view the web page in the browser using the file:///...
|
|
|
|
|
I have tried both the options..If i giv ethe image path as
file:///d/:foldername/abc.jpgthe image itsel is not shown...
also the path is not read..
can u give me any other option..coz it works good in IE
but image fails to get display only in Mozilla and Netscape.
|
|
|
|
|
By this mean, if you use the file:/// protocol for the images in the web page, then the web page also needs to be viewed with this protocol in FF (though IE works just fine in this case). If you view the web page starting with http:// .. then the url of the images need to be set with http.
|
|
|
|
|
Hello everyone:
I am struggling with XML (which I am really not good at), the file that I am working with is something like this:
<MotherCompany Name="MC">
<Company Name="CompanyOne">
<Department>
<IsPositions>
<Temp>
<MoreNestedDetails></MoreNestedDetails>
</Temp>
<IsPerm>
<MoreNestedDetails></MoreNestedDetails>
</IsPerm>
<Intern>
<MoreNestedDetails></MoreNestedDetails>
</Intern>
<Other>
<MoreNestedDetails></MoreNestedDetails>
</Other>
</IsPositions>
</Department>
</CompanyOne>
<Company Name="CompanyTwo">
<Department>
<IsPositions>
<Temp>
<MoreNestedDetails></MoreNestedDetails>
</Temp>
<IsPerm>
<MoreNestedDetails></MoreNestedDetails>
</IsPerm>
<Intern>
<MoreNestedDetails></MoreNestedDetails>
</Intern>
<Other>
<MoreNestedDetails></MoreNestedDetails>
</Other>
</IsPositions>
</Department>
</CompanyTwo>
<Company Name="CompanyThree">
<Department>
<IsPositions>
<Temp>
<MoreNestedDetails></MoreNestedDetails>
</Temp>
<IsPerm>
<MoreNestedDetails></MoreNestedDetails>
</IsPerm>
<Intern>
<MoreNestedDetails></MoreNestedDetails>
</Intern>
<Other>
<MoreNestedDetails></MoreNestedDetails>
</Other>
</IsPositions>
</Department>
</CompanyThree>
<Company Name="CompanyFour">
<Department>
<IsPositions>
<Temp>
<MoreNestedDetails></MoreNestedDetails>
</Temp>
<IsPerm>
<MoreNestedDetails></MoreNestedDetails>
</IsPerm>
<Intern>
<MoreNestedDetails></MoreNestedDetails>
</Intern>
<Other>
<MoreNestedDetails></MoreNestedDetails>
</Other>
</IsPositions>
</Department>
</CompanyFour>
</MotherCompany>
Now what I need to do is read the information for each Company under MotherCompany.
A - Since its so freaking nested I am confused as to how to go about collecting the information. Any ideas and suggestion?
B - I tried to use XMLReader; I was doing something like:
<br />
XmlTextReader reader = new XmlTextReader(FileNameWithPath); <br />
while (reader.Read())<br />
{<br />
if (reader.Name == "Company")<br />
{<br />
if (reader.NodeType == XmlNodeType.Element)<br />
{<br />
XmlReader currentNode = reader.ReadSubtree();<br />
while (currentNode.Read())<br />
{<br />
if (currentNode.NodeType == XmlNodeType.Element)<br />
{<br />
switch (currentNode.Name)<br />
{<br />
case "Temp<br />
dataCol.MethodList.Add(currentNode.Name);<br />
break;<br />
case "IsPerm<br />
dataCol.MethodList.Add(currentNode.Name);<br />
break;<br />
case "Intern<br />
dataCol.MethodList.Add(currentNode.Name);<br />
break;<br />
case "Other<br />
dataCol.MethodList.Add(currentNode.Name);<br />
break;<br />
default:<br />
break;<br />
}<br />
}<br />
}<br />
}<br />
}<br />
}<br />
First of all my reader.ReadSubtree(); reads all the Company Elements, I thought that it would read any thing within the Company Element so I would be able to get data for seperate Company Elements depending on thier the Name attribute. How can I do that in the given scenario? Is there a better way? Like somehow skip to the elements that I need instead of worrying about the nested loops and crap?
Any help will be great and HIGHLY appreciated. Thanks.
PS: At some point I will need to go and get more details and it looks like I am keep nesting while loops for every detailed value; is there a better way of doing that?
|
|
|
|
|
Use XPathDocument or XmlDocument instead of the XmlTextReader, unless this is a really huge file.
XPathDocument doc = new XPathDocument("MyFile.xml");<br />
XPathNavigator nav = doc.CreateNavigator();<br />
<br />
XPathNodeIterator nodes = nav.Select("//Company");
Now you should have a collection of Company nodes to iterate through
only two letters away from being an asset
|
|
|
|
|
Mark:
Thanks a lot for your suggestion. This document is typically more then 500 lines but the Company Nodes are not the one that increase the file size, its other junk thats embeded in it. Do you think it would be ok to use XPathDocument for such size files?
Thanks.
|
|
|
|