Showing posts with label format. Show all posts
Showing posts with label format. Show all posts

Monday, March 26, 2012

please help

Hi,

Can anyone suggest me some good tools to format my aspx page , my aspx page
in an application is very much poorly formatted,
I can't even figure out some of the ending tags exactly and aspx
code-behind really look bad.( I know the vs.net edit and formatting will do
up to a limit )

Also i am not sure is there any specific format that we should follow in
the aspx code behind like 65 chars per line(something like this).Can any one
point me to a link reg this?

Is there any add ins or some tools , that we can use in vs.net editor , so
that some of the conditions will be applied automatically while we create
the aspx page.

Excuse my english.

Thanks in advance
HariAs far as specific formats, there isn't really any. I don't like line breaks
and I use 3 spaces for indentation..but it's really up to each team to
create it's own standards. If you can't stand horizontal scrolling, then
maybe you should wrap (although, with proper use of CSS, only the most
complex sites, or the smallest monitors, cause a horizontal scroll I find).

Visual Studio 2003 is notorious for messing up your HTML. This is quite
unfortunate and I don't think there's much you can do about it. The 2005
editor is much easier to work with.

Sorry, but I don't think you'll find any automated answer short of working
hard at it.

Karl
--
http://www.openmymind.net/

"Hari" <sivakumar_ani@.yahoo.com> wrote in message
news:ek6gJEePGHA.2696@.TK2MSFTNGP14.phx.gbl...
> Hi,
> Can anyone suggest me some good tools to format my aspx page , my aspx
> page
> in an application is very much poorly formatted,
> I can't even figure out some of the ending tags exactly and aspx
> code-behind really look bad.( I know the vs.net edit and formatting will
> do
> up to a limit )
>
> Also i am not sure is there any specific format that we should follow in
> the aspx code behind like 65 chars per line(something like this).Can any
> one
> point me to a link reg this?
> Is there any add ins or some tools , that we can use in vs.net editor , so
> that some of the conditions will be applied automatically while we create
> the aspx page.
> Excuse my english.
> Thanks in advance
> Hari

please help

Hi,
Can anyone suggest me some good tools to format my aspx page , my aspx page
in an application is very much poorly formatted,
I can't even figure out some of the ending tags exactly and aspx
code-behind really look bad.( I know the vs.net edit and formatting will do
up to a limit )
Also i am not sure is there any specific format that we should follow in
the aspx code behind like 65 chars per line(something like this).Can any one
point me to a link reg this?
Is there any add ins or some tools , that we can use in vs.net editor , so
that some of the conditions will be applied automatically while we create
the aspx page.
Excuse my english.
Thanks in advance
HariAs far as specific formats, there isn't really any. I don't like line breaks
and I use 3 spaces for indentation..but it's really up to each team to
create it's own standards. If you can't stand horizontal scrolling, then
maybe you should wrap (although, with proper use of CSS, only the most
complex sites, or the smallest monitors, cause a horizontal scroll I find).
Visual Studio 2003 is notorious for messing up your HTML. This is quite
unfortunate and I don't think there's much you can do about it. The 2005
editor is much easier to work with.
Sorry, but I don't think you'll find any automated answer short of working
hard at it.
Karl
--
http://www.openmymind.net/
"Hari" <sivakumar_ani@.yahoo.com> wrote in message
news:ek6gJEePGHA.2696@.TK2MSFTNGP14.phx.gbl...
> Hi,
> Can anyone suggest me some good tools to format my aspx page , my aspx
> page
> in an application is very much poorly formatted,
> I can't even figure out some of the ending tags exactly and aspx
> code-behind really look bad.( I know the vs.net edit and formatting will
> do
> up to a limit )
>
> Also i am not sure is there any specific format that we should follow in
> the aspx code behind like 65 chars per line(something like this).Can any
> one
> point me to a link reg this?
> Is there any add ins or some tools , that we can use in vs.net editor , so
> that some of the conditions will be applied automatically while we create
> the aspx page.
> Excuse my english.
> Thanks in advance
> Hari
>
>

Wednesday, March 21, 2012

Please help me ..(:

Hi,

When user clicks on the PRINT button, i like the system automatically print a WEBFORM ASPX file (which is in Report format)..ie, OnClick it should call that ASPX file and print it...

Please advice me (:You have to make a "Printer Friendly Version" button that the user can click to go to that page (or load a pop up) and then call window.print(); (I think).
You can also create a style in your stylesheet that will resize the controls differently for "print" and "screen" situations. This will allow you to auto-resize all pages so they
are printer-friendly.
Hello -

I'm assuming you have something like an array (list) of documents that
you would like to choose from to print...

I had the same type of task...

I completed it with having a button for each entry on the form, and when
the user pressed a button, a child window (popup) would display the
form (or PDF)
The popup window had a header frame that allowed the user to print or
cancel the form...

the trick was, once the popup window ready to be displayed, i would create
a DIV tag around the entire contents, and the print button would print the
contents of the DIV tag...

I also added a little model window magic - to keep the child window
open until the user closes the popup.

Worked like a champ.

best of luck

take care
tony
Hi,

it's a much cleaner solution to use css for this one. Take a look at this article:CSS Design: Going to Print.

Grz, Kris.

Please help me format my email!

Well I guess they say third times a charm so this is the third time Ive posted here and maybe someone will reply..
OK First off two things you should know:
1) This is my first ever .NET Website. Ever.
2) I'm using Visual Studio .NET 2003 with SQL Server 2000 deveoped under Windows 2000. The site is hosted under Windows Server 2003 so therefore I cannot test the email functionality in my dev environment because it does not support the email method that 2003 Server does...

Any way, I have a page where users send me an Email which contains data taken from their profiles. When I get it, it looks like this:

Web Part Request: Thursday, December 11, 2003 - 7:53:06 AM 1986 Mercedes-Benz 300E Engine: 6 Tran: A Turbo: N A/C: Y Fourwheel: 2 -------------------- I sent disc brakes back friday the 5th through u.s.p.s. for exchange for correct size .I also need timing chain tensioner,I have a timing chain and link and a gasket.

How can I format the email so its not so confusing? I need it to look like this:

Web Part Request: Thursday, December 11, 2003 - 7:53:06 AM
1986 Mercedes-Benz 300E
Engine: 6
Tran: A
Turbo: N
A/C: Y
Fourwheel: 2
--------------------
I sent disc brakes back friday the 5th through u.s.p.s. for exchange for correct size .I also need timing chain tensioner,I have a timing chain and link and a gasket.

Thanks a lot for your time!
Regards,
Joe

Here is the snippet of code for the page and in case you're wondering, I didnt write this part (hence the reason Im asking for help, a coworker who is no longer here set up the basics):


If Not IsPostBack Then

Dim sessionmember As diyauto.diymember.diymemberdetail = New diyauto.diymember.diymemberdetail
sessionmember = Session("userinfo")

If sessionmember Is Nothing Then
Session("loginreturnpage") = "/partfinder/partrequest.aspx"
Response.Redirect(ConfigurationSettings.AppSettings("SiteHomePage") + "/member/loginagain.aspx")
End If

' show the user name
lblName.Text = Trim(sessionmember.firstname) & " " & (Trim(sessionmember.middlename) & " ") & Trim(sessionmember.lastname)

Dim carid As Integer
carid = Val(Request.QueryString.Get("c"))

If carid = 0 Then
Response.Redirect("partlocator.aspx")
End If

Dim carfunct As diymember.diymembercarfunctions = New diymember.diymembercarfunctions
Dim mycar As diymember.diymembercardetail = New diymember.diymembercardetail

mycar = carfunct.carinfoget(sessionmember.memberid, carid)

'if there is nothing here - send them back!
'Response.Redirect("partlocator.aspx")
If mycar Is Nothing Then
Response.Redirect("partlocator.aspx")
End If

lblCarInfo.Text = mycar.year.ToString + " - " + RTrim(mycar.makename) + " " + RTrim(mycar.modelname) + " Engine: " + mycar.engine + " Tran: " + mycar.autotransmission + " Turbo: " + mycar.turbo + " A/C: " + mycar.aircondit + " Fourwheel: " + mycar.fourwheel + " VIN: " + RTrim(mycar.vin)
hidlabCarInfo.Text = mycar.year.ToString + " " + RTrim(mycar.makename) + " " + RTrim(mycar.modelname) + vbCr + "Engine: " + mycar.engine + vbCr + "Tran: " + mycar.autotransmission + vbCr + "Turbo: " + mycar.turbo + vbCr + "A/C: " + mycar.aircondit + vbCr + "Fourwheel: " + mycar.fourwheel + vbCr + "VIN: " + RTrim(mycar.vin)

End If

End Sub

Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click

If Len(LTrim(RTrim(tbxRequest.Text))) = 0 Then
lblError.Text = "Please indicate the parts you're Looking for!"
Return
End If

Dim sessionmember As diyauto.diymember.diymemberdetail = New diyauto.diymember.diymemberdetail
sessionmember = Session("userinfo")

If sessionmember Is Nothing Then
Session("loginreturnpage") = "/member/myaccount.aspx"
Response.Redirect(ConfigurationSettings.AppSettings("SiteHomePage") + "/member/loginagain.aspx")
End If

' lets prepare an e-mail and send it along to the parts folks!

Dim Maildiy As New System.Web.Mail.MailMessage
Maildiy.From = RTrim(sessionmember.email)
Maildiy.To = "joe@dotnet.itags.org.diyautoparts.com"
Maildiy.Subject = "WEBSITE PARTS REQUEST"
Maildiy.BodyFormat = Mail.MailFormat.Text
Maildiy.Body = "Web Part Request: " + DateTime.Now.ToLongDateString + " - " + DateTime.Now.ToLongTimeString + vbCr + vbCr + hidlabCarInfo.Text + vbCr + vbCr + "--------------------" + vbCr + vbCr + RTrim(tbxRequest.Text)
System.Web.Mail.SmtpMail.Send(Maildiy)
Maildiy = Nothing

' send an e-mail to the sender!
Dim MailCust As New System.Web.Mail.MailMessage
Dim replytext As String

MailCust.From = "parts@dotnet.itags.org.diyautoparts.com"
MailCust.To = RTrim(sessionmember.email)
MailCust.Subject = "DIYAUTOPARTS.COM - Part Request from Website"
'replytext = "Thank you for requesting car part information from DiyAutoparts.com. Your request has been entered into our system and we will contact you as soon as we have information for you." + vbCr + vbCr + "Our office hours are Monday - Friday 8:00am - 4:30pm EST." + vbCr + vbCr
'replytext += "Web Request time: " + DateTime.Now.ToLongDateString + " - " + DateTime.Now.ToLongTimeString + vbCr + vbCr
'replytext += hidlabCarInfo.Text + vbCr + vbCr + "------------------" + vbCr + vbCr + RTrim(tbxRequest.Text) + vbCr

MailCust.BodyFormat = Mail.MailFormat.Text

MailCust.Body = "Thank you for requesting car part information from DiyAutoparts.com. Your request has been entered into our system and we will contact you as soon as we have information for you." + vbCr + vbCr + "Our office hours are Monday - Friday 8:00am - 4:30pm EST." + vbCr + vbCr
MailCust.Body += "Web Request time: " + DateTime.Now.ToLongDateString + " - " + DateTime.Now.ToLongTimeString + vbCr + vbCr
MailCust.Body += hidlabCarInfo.Text + vbCr + vbCr + "------------------" + vbCr + vbCr + RTrim(tbxRequest.Text) + vbCr

'MailCust.Body = replytext
System.Web.Mail.SmtpMail.Send(MailCust)
MailCust = Nothing

Response.Redirect("partlocatorsub.aspx")

End Sub

Private Sub btnQuit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuit.Click
Response.Redirect("partlocator.aspx")
End Sub

Private Sub btnMyAcct_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMyAcct.Click
Response.Redirect(ConfigurationSettings.AppSettings("SiteHomePage") + "/member/myaccount.aspx")
End Sub
End Class

How about just adding some vbCrLf characters in there where you want the line breaks?

Friday, March 16, 2012

Please help newb!

I am trying to format the way an asp app populates on the webpage.

The webpage is here:

http://www.merge-efilmknowledgebase.com

The gif at the top and bottom were added to a header and footer .ascx repectively.

I like the way the body will format itself to the size of the browser window.

Is there anyway of doing this with the header and footer gifs as well?

If not, is there a way to proportion the body so that it is always the same width as the header and the footer gifs...maybe insert blank space of some sort?

Cheers!The body is resizing it's self on your site because you have your content tables width set to 100%, this will make the table take up 100% of the browser unless you have it nested inside another table then it will take up 100% of the containing table. You can set the width property to 100% but I wouldn't suggest stretching your gifs because the will look pixelated and crappy. For the footer you could easily replace the image with a table that has it's bgcolor="#000000" and apply a style to your text like <a style="color:#FFFFFF">some text</a> then you could set the width property of the footer table to 100% but I would'nt try and strech any images. You might be screwed on the header.

example:

<table cellpadding="0" cellspacing="0" bgcolor="#000000" or style="color:#000000"width="100%">
<tr>
<td><a style="color:#FFFFFF" href="http://links.10026.com/?link=somesite">click me</a>
</tr>
</table>
Thanks for your reply and help on this one.

I think I will stick with the current format of the header and footer.

Is there anything I can add at the end of the header and / close at the beginning of the footer so the body will no longer take up 100% and instead will format to the same width as the gifs?

Cheers!
you can put everything inside a table with it's width set to whatever width you want like width="768px" and keep your content tables set to width="100%". Then your content tables will take up 100% of the table rather than the browser so they would all ways be 768px or what ever.
Thanks Jeremy123, you helped me fix this one...I am very grateful!