Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:806347
More Search Options
RSS Available
Matching Posts
Re: Replacing \n line breaks with HTML br line breaks in Gridview; what is the recommended practice.
Hi, this alternative may be useful for any VB user formating in a DetailsView: <asp:TemplateField HeaderText="Description"> <ItemTemplate> <%#Replace(Container.DataItem("Description"), vbCrLf, "<br>")%> </ItemTemplate> </asp:TemplateField> Thank you Aaron for the starter, helped me work this out. Tim
Posted to
Data Presentation Controls
(Forum)
by
crossbyname
on 7/16/2009
Re: Page.IsValid always True
Thank you to everyone for your replys - I tried most things but still got a false "true". If I got rid of any code to hide panel1 then everything worked perfectly. In the end, I added a "panel1.visible = true" to the top of my button click event which solved the problem (new code below). I do not quite understand the logic as beforehand, obviously, to the end user the panel was visible otherwise I could not put in invalid data in my text box - why I needed another panel1.visible
Posted to
Web Forms
(Forum)
by
crossbyname
on 6/9/2009
Re: Page.IsValid always True
UPDATE: As I mentioned earlier, the controls I need to validate are in a panel which is initially hidden on page load. After one postback the panel is visible - this is where I validate my other controls and get a problem. Now, if I go through my code and comment out all my panel1.visible = false statements, my validation works fine. Obviously I need to hide my panel at first - so why does this cause my validation to fail? It looks like I am getting close to a resolution now, I just need to make
Posted to
Web Forms
(Forum)
by
crossbyname
on 6/8/2009
Re: Page.IsValid always True
Still no joy even if using a custom validator, it still returns True each time. Here is the modified code. I made sure whatever is done it should return false - but each time the button is clicked isValid always returns True - Sub CustomValidate( ByVal sender As Object , ByVal args As ServerValidateEventArgs) args.IsValid = False End Sub <asp:CustomValidator ID= "ReqV1" ControlToValidate= "TextBox3" OnServerValidate= "CustomValidate" runat= "server"
Posted to
Web Forms
(Forum)
by
crossbyname
on 6/8/2009
Re: Page.IsValid always True
It is not working on my page - perhapse something to do with it a) being a user control or b) it is the second time a validation has been called. It is frustrating that the code above by itself works fine but not on my page. Here is the complete code... <asp:SqlDataSource ID= "SqlDataSource1" runat= "server" ConnectionString= "<%$ ConnectionStrings:AML17_TestConnectionString %>" SelectCommand= "SELECT [RandomisationNo], [Firstname], [MidInitial
Posted to
Web Forms
(Forum)
by
crossbyname
on 6/8/2009
Re: Page.IsValid always True
Hi, no it is still returning True even if the field is left blank - I tried this earlier with and without the validation group. I am wondering whether it is because I called a validation during my first button click and the page is posted back? I cant figure it out.
Posted to
Web Forms
(Forum)
by
crossbyname
on 6/8/2009
Page.IsValid always True
Hi, Am spending hours trying to get to the bottom of this. I have a user control within a hidden panel which is made visible after a postback (my first button checks a validation for a patient number). The panel has a from and a second submit button that will send data back - at this point I do further validation... I have a RequiredFieldValidator on a text box but when my button is clicked the Page.IsValid always returns True, even if the field is not filled in. here is the form snippit: <asp
Posted to
Web Forms
(Forum)
by
crossbyname
on 6/8/2009
Re: random number
I think I prefer your method, esp when I am getting into more complex variations - cheers
Posted to
Getting Started
(Forum)
by
crossbyname
on 8/12/2008
Re: random number
I think I have figured it out but am sure there is a simpler way. I added a do while its not 4 as below Private Sub Randomise2a() Dim AMLrandomise As New Random Dim t1 As Integer = 0 'TextBox1.Text Dim t2 As Integer = 0 'TextBox2.Text Dim t3 As Integer = TextBox3.Text Dim t4 As Integer = TextBox4.Text Dim t5 As Integer = TextBox5.Text Dim t6 As Integer = 0 'TextBox6.Text Dim t7 As Integer = 0 'TextBox7.Text Dim t As Integer If t3 < t4 And t3 < t5 Then t = 3 If t4 < t3 And
Posted to
Getting Started
(Forum)
by
crossbyname
on 8/12/2008
random number
Hi, I am having difficulty generating a value randomly between two distinct number, 3 or 5. I can randomise anything between two numbers, so the generated number is either 3, 4 or 5 but I cant randomise so that the generated number is either 3 or 5. Here is the code. Dim AMLrandomise As New Random Dim t3 As Integer = TextBox3.Text Dim t4 As Integer = TextBox4.Text Dim t5 As Integer = TextBox5.Text Dim t As Integer If t3 < t4 And t3 < t5 Then t = 3 If t4 < t3 And t4 < t5 Then t = 4 If
Posted to
Getting Started
(Forum)
by
crossbyname
on 8/12/2008
Page 1 of 3 (23 items) 1
2
3
Next >
Channel 9:
Channel 9 Live at PDC09: Dr Jeff Norris, NASA
Channel 10:
Flickr Drive Integrates Flickr into Windows Explorer
Channel 10:
Playfire: A Growing Network for Gamers
Channel 10:
Find the Top iPhone Apps with Bing (Yes, Really!)
Channel 10:
Xbox to Become Emergency Alert System
Channel 10:
Progression of the Iconic Background
WindowsClient:
ASP.NET AJAX 4.0 Data Binding on MSDN Magazine
WindowsClient:
Don’t miss out..
TechNet Edge:
Improving Collaboration with SharePoint - Tech Focus December 2009 Part 1
Channel 9:
Channel 9 Live at PDC09: Scott Guthrie
Channel 10:
Get Discounted Concert Tickets at the New Windows Section 7
Channel 10:
Get Bing Wallpapers on the iPhone
Channel 10:
Bing Gets a New Toolbar
ASP.NET:
More on medium trust: what permission are you missing?
Channel 9:
Channel 9 Live at PDC09: Bob Muglia
WindowsClient:
Adventures With Windows Azure Diagnostics
Mix Online:
Adventures With Windows Azure Diagnostics
Channel 9:
Channel 9 Live at PDC09: Ray Ozzie
Channel 9:
Coding4Fun: DrinkTendr
Channel 9:
TWC9: Scott Hanselman, John Galloway, Bing, parallel unit tests, more
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online