|
leppie wrote:
I use C# server-side! And JavaScript client-side. How did you get to that conclusion?
Oh, did not realise you were doing ASP.NET, so when I saw the Java like syntax thought you were doing JScript in ASP.
|
|
|
|
|
If you are using asp.net, then you are doing things the hard way.
There is almost zero need to use the Request object in an asp.net webform.
the TextBox control knows how to populate and persist its values from the request and viewstate.
Just use the TextBox's Text property in your event handler.
|
|
|
|
|
Andy Smith wrote:
If you are using asp.net, then you are doing things the hard way.
There is almost zero need to use the Request object in an asp.net webform.
That is so, IF you are using the MS webcontrols. Fortunately, all the controls I am using, is custom rendered and does NOT work like MS intend them to be! I had a guy look at it and it reminded him of JSP (he know nothin of .NET though) , so hopefully it will be easily portable to Java
Cheers
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
Then I still say you are still doing things the hard way.
But hey, if you are intending to do things the hard way... have fun man.
|
|
|
|
|
Andy Smith wrote:
But hey, if you are intending to do things the hard way... have fun man.
I wouldnt say hard, its much more logical to me! Anyways, all code will be made available on CP as an article
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
you cant place web controls on a page with a flow layout. I design my controls to use a flow layout so DummyX can use it on his 640 x 480 monitor and Geek11 can use it at 3024 x 2258.
Now my problem with a grid layout is that when u move the controls on the webpage it adds pointless table code to my page , and franky ^%$^'s it up! (nothin new on WinForms ) Is there maybe a way to force it?
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
leppie wrote:
Is there maybe a way to force it?
Well first off I say don't use the VS.NET web-forms designer it does a bad job and is rather buggy.
But if you insists... I do not know how to permanently turn grid layout off, but you can follow these instructions each time you create a new webform:
To set the pageLayout property in the Properties window
1. Open an HTML document for editing in the HTML Designer
2. At the top of the Properties window, choose DOCUMENT properties
3. Select the pageLayout property, and choose a value from its drop-down list
Or change the body tag to this: <BODY ms_positioning="FlowLayout">
|
|
|
|
|
Thats all nice and well, but you cant drag a control to the page!
Maybe I must reboot
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
leppie wrote:
you cant place web controls on a page with a flow layout.
Ehhh? What?
I use web controls on a flow layout all the time. Am I misunderstanding you here?
Paul
|
|
|
|
|
Need a little help from one who knows more than I.
I am trying to generate a simple function in an asp.net page. I want the page to store the IP address of the machine hitting the page and display it on the same page.
Anyone have some help?
Thanks.
Thorlin
|
|
|
|
|
Request.UserHostAddress gives you the IP address.
Storing it depends what methods you have for storage.
To display it back to the page, drop a label from the ToolBox wherever you want to display it, then in the Page_Load event say MyLabel.Text = Request.UserHostAddress
Hope that helps.
Paul
|
|
|
|
|
Hi all, how can I simplify this?
.ThreadNormal
{
border-right: #ff9966 1px solid;
padding-right: 3px;
border-top: #ff9966 1px solid;
padding-left: 3px;
padding-bottom: 3px;
border-left: #ff9966 1px solid;
padding-top: 0px;
border-bottom: #ff9966 1px;
background-color: #ffffcc;
}
.ThreadEnd
{
border-right: #ff9966 1px solid;
padding-right: 3px;
border-top: #ff9966 1px solid;
padding-left: 3px;
padding-bottom: 3px;
border-left: #ff9966 1px solid;
padding-top: 0px;
border-bottom: #ff9966 1px solid;
background-color: #ffffcc;
}
The only difference is the bottom border. Can I do somthing like this?
.Thread
{
border-right: #ff9966 1px solid;
padding-right: 3px;
border-top: #ff9966 1px solid;
padding-left: 3px;
padding-bottom: 3px;
border-left: #ff9966 1px solid;
padding-top: 0px;
background-color: #ffffcc;
}
.Thread.End
{
border-bottom: #ff9966 1px solid;
}
.Thread.Normal
{
border-bottom: #ff9966 1px;
}
ANy help appreciated
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
leppie wrote:
Hi all, how can I simplify this?
Couple ways in fact. Probably the best way is this:
.ThreadEnd, .ThreadNormal
{
border-right: #ff9966 1px solid;
padding-right: 3px;
border-top: #ff9966 1px solid;
padding-left: 3px;
padding-bottom: 3px;
border-left: #ff9966 1px solid;
padding-top: 0px;
background-color: #ffffcc;
}
.ThreadEnd
{
border-bottom: #ff9966 1px solid;
}
.ThreadNormal
{
border-bottom: #ff9966 1px;
}
You can define more than one CSS class at a time using the comma (,).
Also you can then re-define classes later on in the CSS file. In fact you can re-define as many times as you want, and any non-specified attribute will not be overwritten.
The other way is:
.Thread
{
border-right: #ff9966 1px solid;
padding-right: 3px;
border-top: #ff9966 1px solid;
padding-left: 3px;
padding-bottom: 3px;
border-left: #ff9966 1px solid;
padding-top: 0px;
background-color: #ffffcc;
}
.ThreadEnd
{
border-bottom: #ff9966 1px solid;
}
.ThreadNormal
{
border-bottom: #ff9966 1px;
}
and then in your HTML:
<div class="Thread ThreadNormal">still not the end, sigh</div>
<div class="Thread ThreadEnd">the end is nigh!</div>
As you can see you can specify more than one class at a time in an HTML element. It is actually a good thing too, not just a hack.
|
|
|
|
|
Thanx Paul , seems to be just what I need
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
I set an cookie somewhere in my code for user login like this:
FormsAuthentication.SetAuthCookie( EmailAddress.Text, true );
FormsAuthentication.RedirectFromLoginPage("/ThePhile/default.aspx",true);
Now after I redirect to default page,How can I see if this cookie set and read it?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
If you were using fully automated Forms Authentication (which I've been playing with all night), you can use HttpContext.Current.User.Identity.Name to get the currently logged in User ID.
It might work in your case too.
If not then can you use FormsAuthentication.GetAuthCookie ?
Paul
|
|
|
|
|
I moved my application from my machine to the test server this morning and have run into an error reportable in the web.config file. I have been looking for a solution to this error but have come up with nothing. Here is the error message:
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
As always I appreciate everyone’s help.
Jason W.
|
|
|
|
|
Jason Weibel wrote:
As always I appreciate everyone’s help.
Your post is a bit confusing, but did you replace <customErrors mode="RemoteOnly" /> with <customErrors mode="Off" /> ?
If you did, then the next step is to ensure that in IIS the folder the web.config file is in is specified as an IIS Application. If it is, then I do not know what your problem is
|
|
|
|
|
Are these settings case sensitive?
I think they are...
I am pretty sure that I used the word 'off' once instead of 'Off' and got an error back..
|
|
|
|
|
Figured it out, Thanks for the help.
Jason W.
|
|
|
|
|
Jason Weibel wrote:
Figured it out
Mind sharing what the problem was?
|
|
|
|
|
Ray Cassick wrote:
Are these settings case sensitive?
Oh yes most definitely. Remeber web.config is an XML file, so it must follow all the rules of XML. Case sensitive, close elements, quote attributes, one root element, children cannot span parents etc. etc.
|
|
|
|
|
I have an HTML newsletter, which also has a txt only version. I am looking for some way of parsing out the links from the HTML version using an ASP function, and including them in the text only version.
So instead of:
visit this great site,
you'd get something like:
Visit this great site (www.codeproject.com)
Unfortunately, I only have WSH 5.0 - so no regular expressions that I've tried seem to work. Any ideas?
|
|
|
|
|
Hi folks:
Im trying to make some .pdf files visible to users by using asp.net pages.Since it's sensitive i use a dll to bring the pdf from a non web older to a web folder at runtime if the user has access permission.Now the funny part is that everything works fine except that, the client system keeps asking him everytime the program he needs to use to open pdf files.But if i open the same pdf file from the desktop then it just opens with adobe acrobat.I did the registration of the file type both in my webserver and also in client,s machine.
So then why this peculiar behaviour when the pdf file is being opened in a web-page??
Any help is MORE THAN WELCOME.
Regards
Pradhip.S
Regards
Pradhip.S
Why Need Parking lots in Bars when Drunken Driving is Prohibited
|
|
|
|
|
Pradhip wrote:
I did the registration of the file type both in my webserver and also in client,s machine.
I think you will have to register pdf as MIME type on the server, I'm not sure how though, it comes from a memory from a few years back
Hope it works
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|