|
i want same code that u define. when i use this code it give error in
in following line plz guide me.i have imports System.configuraton
Dim config As System.Configuration.Configuration
Dim appSetting As New System.Configuration.AppSettingsSection
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~")
appSetting = config.GetSection("appSettings")
suhail shabab
|
|
|
|
|
Can you tell me the Error please??
|
|
|
|
|
System.Configuration.AppSettingsSection is not define
|
|
|
|
|
Please post your code...
The error is not relevent to find the fact.
|
|
|
|
|
whenever web.config file changed the application starts again..
so first u have to find a way to change the web.config file without restarting the application
|
|
|
|
|
Hi ASP.net Lovers
Well budys if .Net Framework 3.0 is released then whats new specific for ASP.net??? Thanks for your time...
|
|
|
|
|
.NET 3.0 right now is the new name for WPF. What's new for the web is WPF/E, but it's not really part of ASP.NET.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You can combine ASP.NET with WF for a workflow-based site. Also you can have authentication based on Cardspace.
|
|
|
|
|
Hi Friends,
I need to have Click event for the Label control. Presently .NET 2.0 does not provide Click event for a label box.
I inherited the Label control and created my own control with Click event. But it not working.
Can anyone helping me? Gimme a example or reference if possible.
|
|
|
|
|
Venkatesh MookkanI inherited the Label control and created my own control with Click event. But it not working.
You should also inherit from the IPostBackEventHandler interface and implement the RaisePostBackEvent so that it raises your click event. Then add the following line to the control initialization:
this.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(this, this.ClientID));
|
|
|
|
|
szukuro wrote: You should also inherit from the IPostBackEventHandler interface and implement the RaisePostBackEvent so that it raises your click event.
I did this already...
szukuro wrote: this.Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(this, this.ClientID));
Here "Page" throws NullReferenceException. I have already tried it and removed it.
|
|
|
|
|
Venkatesh MookkanHere "Page" throws NullReferenceException. I have already tried it and removed it.
Have you tried it in a late event like OnPrerender? If you use this before the Control gets added to the a page, the Page property is null.
|
|
|
|
|
I am not saying about the Controls..
I am talking about the "Page".
You can try my code:
<DefaultProperty("Text"), ToolboxData("<{0}:EglLabel runat=server></{0}:EglLabel>"), _<br />
Description("Eagle Label")> _<br />
Public Class EglLabel<br />
Inherits Label<br />
Implements IPostBackEventHandler<br />
<br />
<br />
Public Event Click As EventHandler<br />
<br />
<br />
Protected Overridable Sub OnClick(ByVal e As EventArgs)<br />
RaiseEvent Click(Me, e)<br />
End Sub<br />
<br />
Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEvent<br />
OnClick(EventArgs.Empty)<br />
End Sub<br />
<br />
Public Sub New()<br />
Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(Me, ClientID))<br />
End Sub<br />
End Class
|
|
|
|
|
Venkatesh MookkanPublic Sub New()
Attributes.Add("onclick", Page.ClientScript.GetPostBackEventReference(Me, ClientID))
End Sub
End Class
That's the problem rigt here. Like I said, you try to attach the method too early. In the constructor the control has not been added to a page yet, thus the Page property is Nothing at this time. Later on in the control life cycle the controls will get added to a page, and the Page property will now contain a reference to this page.
So to make it work, insteas of Public Sub New() write Protected Overrides Sub OnPreRender(ByVal e As System.EventArgs)
|
|
|
|
|
Its working... Thanks Man...
|
|
|
|
|
HI Venkatesh
How are you adding that Label to youe Aspx page ?
As its not a custom control ...
Where are you declaring this label in Aspx.cs file ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Sandeep Akhare wrote: How are you adding that Label to youe Aspx page ?
Hey Sandeep, I am not adding... I am inheriting the Label as MyLabel which has all the features of Label. In addition to that I am adding Click event to it.
Thats it...
It works fine...
|
|
|
|
|
Venkatesh MookkanI am not adding...
You are not adding this MyLabel to any aspx page ?
Actually after reading your post i found it intresting so i also started but
i am confused Can you post the whole code ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Hey Sandeep,
I can't post the source since it is my Company's property. Its all about INHERITANCE.
Right example is, each CodeBehind of ASP.NET inherits from Page Class.
|
|
|
|
|
i have datagrid with paging (page no)
In that datagrid one column contains check box. can we make the checked state remains checked while traversing different pages in datagrid. how can i get the values of particular column which are in checked
give the answer for this in asp.net 1.1
m.ramesh
|
|
|
|
|
Use FindControl method and find the CheckBox using its name.
|
|
|
|
|
getting values of particular page is not a problem using findcontrol
first i have to maintain the state checked for all pages (getting postback)
afterwards i have to get checked values(state=true) for all the pages
Thanks for your answer
help me in this regard
m.ramesh
|
|
|
|
|
M.Ramesh wrote: first i have to maintain the state checked for all pages (getting postback)
M.Ramesh wrote: afterwards i have to get checked values(state=true) for all the pages
Do you think this explains what you want to say?
Can you post the code if possible?
|
|
|
|
|
I have some datas in a dataset. How can i bind the datas in datagrid using ajax.. anybody please help me..
m.ramesh
|
|
|
|
|