|
to be simple i had three columns in my gridview and all three columns had bound values / data...
the thing that i wanted to do is how to make the first column that has bound data into a buttonColumn for selection?
start a new beginning in every ending; thats what life for......
|
|
|
|
|
moomoooomoo wrote: bound data into a buttonColumn for selection
Can You explain this?
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
Hi
<asp:GridView ID="GridView1" runat="server">
<Columns>
<asp:CommandField ButtonType="Button" ShowSelectButton="True" />
</Columns>
</asp:GridView>
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
this helps but this code adds a new control button..
i want to make use one of my three columns that is already displayed on the gridview... and change it to be an hyperlink to button select....
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Oh.. I See
What you should do is
convert field in to a template field.
Add watever controls you need in to the template field.
To succeed, we must first believe that we can.
Sherin Iranimose
|
|
|
|
|
How to list field heading / column headings when there is no records in the case of gridview listing of data.
Thank you
vijaya
vijaya
|
|
|
|
|
In the function that gets the data, check the count of the rows, and if its = 0 add a blank dummy row:
if (myTable.Rows.Count==0)
{
DataRow myNewRow = myTable.NewRow();
myTable.Rows.Add(myNewRow);
}
|
|
|
|
|
i am not getting it so i used this mehtod but
how to implement it in BLL ?
if (GridView1.Rows.Count == 0)
{
GridView1.DataSource = mylist.GetAdapter("SELECT 'COMPCD', 'COMPNM', 'CORPADD','CORPCITY' FROM Dual ");
GridView1.ShowHeader = false;
}
GridView1.DataBind();
vijaya
|
|
|
|
|
i want to set the connect string in webconfig file at run time.my sanrio is than when my web page load that server name read from note paid and than write in webconfig file'
is it possible?
<add key="dbcon" value="Persist Security Info=False;User ID=sa;password=sa;Initial Catalog=RMS;Data Source=varServerName">
suahil shahab
|
|
|
|
|
well budy can't understand why you want to do this...
|
|
|
|
|
If you change the web.config file at runtime, the web application will be restarted.
What is it that you want to accomplish?
---
single minded; short sighted; long gone;
|
|
|
|
|
You can write... But when you change the web.config, the application will compiled again by MSIL by the ASP.NET. So all the sessions will be destoryed...
Example:
Dim config As System.Configuration.Configuration<br />
Dim appSetting As New System.Configuration.AppSettingsSection<br />
<br />
config = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~")<br />
appSetting = config.GetSection("appSettings")<br />
<br />
'To add new key<br />
appSetting.Settings.Add("[KEY_NAME]", "[VALUE]")<br />
<br />
'To change exists key<br />
appSetting.Settings("[KEY_NAME]").Value = "[VALUE]"<br />
<br />
<br />
config.Save()
|
|
|
|
|
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
|
|
|
|