AJAX :: Can Define Or Use 2 CollapseControlID
Jan 19, 2010Can I define or use 2 "CollapseControlID"? If yes how?CollapseControlID="ATTCoachSubmitButton; CoachPanel"
View 4 RepliesCan I define or use 2 "CollapseControlID"? If yes how?CollapseControlID="ATTCoachSubmitButton; CoachPanel"
View 4 RepliesOn a page for new users to register, I've placed a asp:wizard control in a updatepanel.Everything is working great, but now I want a new user to upload an image. This however requires a full postback.Is there any way to define the finishbutton of the wizard as a postbacktrigger while the next and previousbuttons remain asynchpostbacktriggers?
View 1 RepliesI am using Ajax CalendarExtender , the calendar work well. I want to hilight and tooltips holiday that I define on calendar. I found some similar post , but failed to work. Below is my code.
<asp:TextBox ID="TextBox2" runat="server"
style="color: #333333"></asp:TextBox>
<cc1:TextBoxWatermarkExtender ID="TextBox2_TextBoxWatermarkExtender"
runat="server" Enabled="True" TargetControlID="TextBox2"
WatermarkText="--Select Here--">
</cc1:TextBoxWatermarkExtender>
<cc1:CalendarExtender ID="TextBox2_CalendarExtender" Format="yyyy-MM-dd" runat="server"
Enabled="True" TargetControlID="TextBox2">
</cc1:CalendarExtender>
I have defined a web service function for AutoCompleteExtender, but in addition to the two parameters passed "prefixText" and "count" i want to pass another parameter for a label in that function. So, how to define that ?
View 3 Replies<select name="MessageType" style="width: 151px">
<option value="P">P - Proprietary</option>
<option value="B">B - BCBSA</option>
<option value="S">S - Place Specific</option>
</select>
How to set the selected value for this Dropdownlist box?
<%=p.MessageType%>.. this is the value I am getting from database so that In my Grid what ever the Value coming form database it will show in the Dropdownlistbox on the Grid now its showing me as Default value P even Database value B
the best way to define the Database Path as i m using
Code:
MyDbPath = "D:ASP SitesHwMan ADOApp_DataHwMan.mdb"
Conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & MyDbPath)
Can you let me know the equivalent of C/C++ #define in asp.net?
View 5 RepliesI like to handle and compare a lot of date times in my repeater even I have to work more than one time with the same.
It's a bit ugly, to cast everywhere the Eval("MyDate") like ((DateTime)Eval("MyDate")) to substract 2 datetimes or to compare it, even if you have to do this more than in one operation.
I thought of saving all the evals in a var at start of the repeater?
DateTime mydt1 = Eval("myDate");
DateTime mydt2 = Eval("mydate");
after that, it's easy to do any operations in the whole repeater. Hope you understand my idea. Is this possible? I tried short but everytime errors.
mydt1 - mydt2....
where should commonly used utility functions (to be used in multiple .aspx files) be coded? I currently have these common funcs in an .ascx user control that's referenced in each .aspx file.
View 2 RepliesI want client access a data center but without use database , so I want my web app can retain a global or Application session variable, that contains the data, every client can access the same data... I am try to declare in golabl, but seem it only can store String but others ..
View 5 Replies to define a variable/property of more than one type. Let's say i want a property TextWebControl that is a WebControl and also implements Web.UI.ITextControl(f.e. like a TextBox or Label). But i don't want to enforce that it is a TextBox or Label, but only one that inherits from WebControl and also implements ITextControl so that it also would work with controls added in future releases of .Net-Framework.
.Net-Framework 4.0
Edit: I have retagged the question and added VB.Net because it's my default language. Normally it's no problem for me to understand C# also, but i must admit that it's difficult to translate generic stuff to VB.Net without experiences and it's also better documentated in C# than in VB. So i would appreciate(and aceept) a working example of a VB.net generic type of ITextControl/WebControl.
From Marc's answer i understand that i need a generic class. But how do i instantiate it in SomeClass? This won't compile:
Class SomeClass
Public Property info As InfoControl(Of WebControl, ITextControl)
End Class
Is possible define different profiles a the same time?
I have two type of users in my web site and they have different properties.
Using asp.net profile is possible to define two or more profiles with distinct properties?
In one of my asp.Net pages I want to set some properties of a user control so that it behaves differently to make things easier and faster while I debug and test my page.I want to compile the code block where I set my properties only if I am running the VS in DEBUG. I know I can use conditional compiling
View 2 RepliesI'm using MySql in my asp.net project. But I don't want to type every "using MySql.Data.MySqlClient;" statement in every aspx.cs/aspx.vb file. How can I define this lines in web.config file?
I've defined some namespaces like below but this only works for aspx pages:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0"/>
<pages>
<namespaces>
<add namespace="System.Web.Configuration"/>
<add namespace="MySql.Data"/>
<add namespace="MySql.Data.MySqlClient"/>
</namespaces>
</pages>
</system.web>
</configuration>
related question : Define common namespaces for code pages in Web.Config
i have a view that i need to add the following code to it :-
<%= Ajax.ActionLink( "event",
"Register", "ArticleComment" new { id= Model.article1.Article_ID },
new AjaxOptions { UpdateTargetId="rsvpmsg" }) %>
but it raised a red line under Ajax.ActionLink indicating that it do not contain definition for ActionLink
Define Generic in one line / I know that List<string>, Stack<string>, Queue<string>, Dictionary<string,string> & linkedList<string> alls are generic but i want to know its one Line
View 3 RepliesI'm reading about URL routing at How to: Define Routes for Web Forms Applications and there's something in the example I don't understand. If you look at the example provided below,
routes.MapPageRoute("", "SalesReport/{locale}/{year}/{*queryvalues}", "~/sales.aspx");
there is a way to define more than one proxy in the web.config for an application?
View 1 RepliesI have been experimenting with WebMatrix, specifically the ability to connect to and use SQL CE data.
My question is:
When I am creating a new SQL Compact database with several tables, how do I define relationships between the tables?
The "Relationships" button in WebMatrix is always greyed out. Is that because it is still in Beta? Or am I missing something?
i want to add [Authorize] to specific roles; some for registered users and other for admins , but when i have created my mvc2 web application , i can only register new users but without roles and when i checked the aspnet_role table i found it empty, so how i can define admin roles for some of the registered users and the user role for the rename users
View 2 RepliesI am writing a webpart and was trying to update the browser title... so, I went into mywebpart.ascx added the following:
<asp:Content ID="contentPageTitle" ContentPlaceholderID="PlaceHolderPageTitle" runat="server">
<%= SPContext.Current.Site.OpenWeb().Title %>
</asp:Content>
I then got this error:
Content controls have to be top-level controls in a content page or a nested master page that references a master page.
So, I am trying to do it programatically in mywebpart.cs by doing:
Content content = new Content();
content.ContentPlaceHolderID = "PlaceHolderPageTitle";
I now need to input this piece: SPContext.Current.Site.OpenWeb().Title
What property in the Content control allows me to do that?
See the page [URL].
Defining namespaces in web.config works fine with VB.NET, but C# is not recognizing the namespaces.
public static string SEARCH_STRING = "searchkey";
string key=Request.QueryString.Get(SEARCH_STRING);
How to change the above code to make SEARCH_STRING be accessed using a Property(get; set;) instead of a public variable
I want to define a DataList in the code behind but i don't know how to do it.
I just just know how to do it in the ASP.NET:
Data Source DataList
<asp:AccessDataSource ID="adsExample" runat="server"
DataFile="~/MyDatabase.mdb"
SelectCommand="SELECT Best4.[Year], Countries.Flag, Countries.ENAME AS Champion FROM (Best4 INNER JOIN Champions ON Best4.CHID=Champions.CHID) INNER JOIN Countries ON Champions.CountryID=Countries.CountryID ORDER BY Best4.[Year];">
</asp:AccessDataSource>
DataList
<asp:DataList ID="DataList1" runat="server" DataSourceID="adsExample">..........
When i am running my Visual Web Developper, the result is a list of x numbers of three values:
1999 [an image (Canadian Flag)] Canada
2003 [an image (US Flag)] USA
2005 [an image (Indian Flag)] India
...
Is this a defect with Razor nested layouts?
View 3 Replies