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:385153
More Search Options
RSS Available
Matching Posts
Re: Creating Unique Names & Values For Input Controls In A Repeater
Elbows: SlickShaft.Web.Controls.CommandCheckBox is just what I typed into my editor. I renamed it. In the example above, it should have just been CmdCheckBox. But none the less, glad you got your problem solved.
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 10/27/2006
Re: Creating Unique Names & Values For Input Controls In A Repeater
Hey jmills. One of two suggestions both using ItemDataBound event. Use a multiview. In view 0 have your yes/no display. and in view 1 have your textbox display. Or just have both the Checkbox and Textbox and depending on the value set the visible properties. if it's a yes/no value...set the Checkbox Visible to true and the text box Visible to false... else it's a value that needs to go into a textbox so textbox is visible and checkbox is not.
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 10/27/2006
Re: Creating Unique Names & Values For Input Controls In A Repeater
As for the INamingContainer interface. Just let asp.net do it's work. So no, you can't associate your Ids with it. The reference to the CommandCheckBox should have been CmdCheckBox. So yes, it's a custom control. Which is what I gave above. The reason for the custom checkbox is to give you another place to associate your database data with the control. Thus not having to try something hackish like associating the ID with a database value.
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 10/27/2006
Re: Creating Unique Names & Values For Input Controls In A Repeater
Yes it is a custom control. There is no need to override the Render method, as the base class already renders what you wants. A check box. All that was done in this Custom Control was the addition of two properties. CommandName and CommandArgument. I named them this, because the buttons in asp.net have properties named CommandName and CommandArgument that are handy for associating data with the buttons.. So I just used those names, cause they are familar. The values in the properties are stored in
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 10/16/2006
Re: <asp:Grid view> HELP!!!!
It's actually pretty easy. Just a couple steps to complete. First. In your GridView Columns, convert your CommandField to a TemplateField. You can do that in design mode by clicking on the arrow in the top right, and choosing edit columns. Then click your commandField in the list, and choose the link that says convert to TemplateField. So your field should look similar to < asp:TemplateField ShowHeader= "False" > < EditItemTemplate > < asp:LinkButton ID= "LinkButton1"
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 10/16/2006
Re: Creating Unique Names & Values For Input Controls In A Repeater
Since you want to associate data from the database with your checkbox to process on the server later... you should probably use an System.Web.UI.WebControls.CheckBox over plain Html Controls. Unfortunately the CheckBox still doesn't allow you to associate data with it. But this is .NET and we can extend controls. So I would make a check box that can be associated with data. Like.... public class CmdCheckBox : System.Web.UI.WebControls.CheckBox { public string CommandName { get { object o = this
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 10/16/2006
Re: Automatic Role Assignment?
No, it's not in the web.config. I must say, if you don't know what an event is in .NET you should definately look into. Anyhow. Here is the user code I use for assigning a default role. protected void CreateUserWizard_CreatedUser( object sender, EventArgs e) { CreateUserWizard cuw = sender as CreateUserWizard; if (cuw != null ) { Roles.AddUserToRoles(cuw.UserName, getDefaultRoles()); } } private string [] getDefaultRoles() { return ConfigurationManager.AppSettings[@ "DefaultRoles" ].Split( ',' );
Posted to
Security
(Forum)
by
etheren
on 7/17/2006
Re: Automatic Role Assignment?
Basically what I do is use the UserCreated event for the CreateUserWizard. And it would look something like protected void CreateUserWizard_CreatedUser( object sender, EventArgs e) { CreateUserWizard cuw = sender as CreateUserWizard; if (cuw != null ) { Roles.AddUserToRoles(cuw.UserName, getDefaultRoles()); } } And in your case getDefaultRoles would look like... private string [] getDefaultRoles() { return new string [] { "members" }; } If you just have 1 role and don't believe it'll ever change
Posted to
Security
(Forum)
by
etheren
on 5/1/2006
Re: FormView paging problem.
So I opened up ILDasm. Probably should have had that thought earlier. Anyways, I inspected the FormView class. "Prev", "Next" "First" and "Last" are handled in the private method, HandleEvent. In this case, it compares the string to see if the string is "Last", if yes it checks if ViewState is enabled. If it is is, it sets a variable to PageCount - 1, elseit sets it a variable 0x7fffffff. Then calls HandlePage passing the variable in question. So basically this.HandlePage(this. IsViewStateEnabled
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 3/15/2006
FormView paging problem.
Hello, I have a FormView I have hooked up with a DataSourceControl. I've set AllowPaging to true, and in PagerSettings have set Mode to NextPreviousFirstLast. Everything works fine. Except for one problem. When I hit the "Last" button, it tries to go to page 2147483647 (int.MaxValue). So the work around I have is to handle PageIndexChanging. Here's the code I use. protected void FormView2_PageIndexChanging(object sender, FormViewPageEventArgs e) { FormView fv = sender as FormView; if (fv != null
Posted to
Data Presentation Controls
(Forum)
by
etheren
on 3/15/2006
Page 1 of 2 (13 items) 1
2
Next >
ASP.NET:
Live Preview jQuery Plugin
WindowsClient:
Remember JScript closures capture all variables in scope
TechNet Edge:
UAG reaches RTM
Channel 9:
Who, What, When, Where, Why and How of MIX10
Channel 10:
Berlin Wall in Silverlight
TechNet Edge:
System Center Operations Manager 2007 R2 – Service Level Dashboard part 2, Installation
Silverlight:
Contributing to the SL HVP
Silverlight:
Best SF Books of All Time
Channel 9:
Reactive Extensions API in depth: Repeat
Channel 9:
Jeffrey Van Gogh: Testing Rx with Pex
Channel 9:
The Visual Studio Documentary: Dan Fernandez Full Length Interview
ASP.NET:
Search Engine Optimization (SEO) Toolkit
Channel 10:
This Is Your Data on Silverlight
ASP.NET:
How the IIS SEO Toolkit Saved My Butt
TechNet Edge:
Windows 7 XP Mode User Experience
ASP.NET:
Using WCF RIA Services without Silverlight in Visual Studio 2010 for building 3 tier ASP.NET Applications
Channel 9:
Ping 41: Top stories of 2009, bing, windows 7, laptop hunters, azure
Channel 9:
endpoint.tv - Windows Server AppFabric in action monitoring and troubleshooting
Channel 10:
Windows Marketplace for Mobile Opens to 6.0, 6.1 Phones
Channel 9:
Rx API in depth: Hot and Cold observables
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online