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:809876
More Search Options
RSS Available
Matching Posts
Dynamic Code Compile/Execution in Custom Control
I am building a custom control. Part of the UI for this custom control is an XML defined data entry form. The fields, layout, etc... are defined in the XML. I would like to allow for certain properties, such as default values for the controls specified in the xml, to be code expressions. A specific Example for use on an Intranet: i want to be able to write something like <Field ...other properties... DefaultValueExpression="System.Web.HttpContext.Current.Request.UserHostName" /> And
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 9/25/2009
Re: Dynamic Code Compile/Execution in Custom Control
That is one of the ways I am considering already, and I appreciate the link as it has a good working example i can use. But I am looking for an approach that works kind of the same way that expressions work. Kind of like the Code Expression ( http://weblogs.asp.net/infinitiesloop/archive/2006/08/09/The-CodeExpressionBuilder.aspx ), but that can be used in code-behind/custom control. I kind of assumed that if I Can do it in design view i should be able to do it in code.
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 9/25/2009
Re: Error running Oracle Function
Looks like I was using the wrong connection string... Works now :)
Posted to
Oracle
(Forum)
by
pawicks
on 2/4/2009
Error running Oracle Function
I am trying to run an oracle function inside of a package and I get an error saying that the function is "Not a procedure or is undefined". The function does not take any parameters and I can run it fine from the Oracle server. Protected Sub ExecuteCommandNonQuery() Dim oCMD As New OracleClient.OracleCommand() oCMD.CommandText = "Package.FunctionName" oCMD.Connection = _oConnSSIS 'Connection string to DEV Environment oCMD.CommandType = CommandType.StoredProcedure 'Add
Posted to
Oracle
(Forum)
by
pawicks
on 2/3/2009
Re: retrieving image from web custom control project folder
I based this code off of the code from http://aspalliance.com/726 and then combined it with your code. output.AddAttribute(HtmlTextWriterAttribute.Src, Page.ClientScript.GetWebResourceUrl( Me . GetType (), "Resources/A.gif" )) output.RenderBeginTag(HtmlTextWriterTag.Img) output.RenderEndTag() --Peter
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 12/10/2008
Re: authorization on WebPart
If you don't have any roles then you will need to do this on a user by user basis. You could keep track of this in a table/xml/or hard code it. 'HasPermission is a method that checks if the current user has permission to view webpart if Not HasPermission(CurrentUserName, "MyWebPartName" ) Then MyWebPartObject.Visible = False 'if code is inside of your webpart then you could do 'me.visible = false End If 'Has Permission might look something like this private function
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 12/10/2008
Re: Adding controls dynamically to your custom control at runtime.
If I am understanding your question correctly, then the answer is yes... for i as integer = 0 to pages.Count 'Add a new asp:hyperlink to go to page Dim hl as new Hyperlink() hl.Text = "Page " + i.ToString() AddHandler hl.Click, AddressOf SomeEventToFireOnClickForPageChange MyCoolPageChangerHolderPanel.Controls.Add(hl) next I free handed that, so sorry if it isn't quite perfect. --Peter
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 12/10/2008
Re: Subtags in a custom usercontrol?
I wanted to do this a while ago too and ended up using Reflector to find out how Microsoft does it. After that it was easy: 'parse children is what causes all child list items to be consumed ' and will be placed into the Items collection <ParseChildren( True , "Items" )> _ Public Class EatsListItems Inherits WebControl Public Property Items() As ListItemCollection Get Return _Items End Get Set ( ByVal value As ListItemCollection) _Items = value End Set End Property Protected
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 12/10/2008
Inheriting from existing WebControl viewstate issue
I have a few very simplified controls shown below. The first control inherits from Table and adds a row, a cell, and a checkbox with autopostback enabled. The second control inherits from panel and adds a checkbox with autopostback enabled. The third inherits from CompositeControl and adds a checkbox with autopostback enabled. Only the third one maintains the viewstate (check state) of the checkbox on postback... What do I need to do to make the other two work?? Public Class TableTestControl Inherits
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 12/10/2008
SOLUTION: Three State CheckBox Custom Control
I had a need for a three state checkbox and ended up building a custom control that takes care of it. The states are True/False/Null, or in my code more like True/False/Inherit. The cylce (A normal checkbox is True/False/True/False/etc...) is True/False/Null/True/False/Null/etc... Null is shown by changing the background color of the checkbox, which defaults to LightGrey but can be specified through the InheritColor property (NullColor might be a better choice but you can change it if you want).
Posted to
Custom Server Controls
(Forum)
by
pawicks
on 11/20/2008
Page 1 of 4 (31 items) 1
2
3
4
Next >
ASP.NET:
jQuery Hide/Close Link
ASP.NET:
Merry Christmas
TechNet Edge:
FPE Customer Story
Silverlight:
Being a writer, and having an editor. A Short Rant.
Channel 9:
Channel 9 Live at PDC09: Dr Brian Brooks (3M)
Channel 9:
C9 Lectures: Dr. Erik Meijer - Functional Programming Fundamentals Chapter 13 of 13
Silverlight:
Information for Silverlight HVP Developers…
WindowsClient:
Custom Content Loaders in Silverlight 4.0
WindowsClient:
MVVM Links\Info
TechNet Edge:
Check out how Dolly Parton uses IE8 and Web slices!!!
Silverlight:
A Silverlight HVP Update
Channel 9:
Channel 9 Live at PDC09: This Week on Channel 9 - PDC09 Daily Show Edition Day 1
Channel 9:
Maria Klawe: Scholar, Scientist and Microsoft Board Member
Channel 10:
Play the Bing Sherlock Holmes Game
Channel 9:
Channel 9 Live at PDC09: Loic Le Meur
Channel 10:
How to Delete Jump List Items
Channel 10:
Roll Back to Classic Network Indicator in Win7
Channel 9:
Jafar Husain: Silverlight Toolkit and Rx, Part 2
Channel 9:
Ping 42: Is Microsoft cool? Photo DNA, Win7 tool, 10k MIX contest
Channel 9:
Jafar Husain: Silverlight Toolkit and Rx, Part 1
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online