|
Obviously, you need to work out what is null. Is it customControl1, or is it btn ? If it's btn, then you need to check if btn is null. One thing you could do, is have a bool that you set. Like this
private bool _isEnabled = true;
public bool ButtonEnabled
{
set
{
if (btn != null)
btn.Enabled= value;
_isEnabled = value;
}
}
CreateChildControls()
{
btn=new Button();
btn.Enabled = _isEnabled;
}
I don't believe the code you presented here would even compile, by the way.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi,
I have the wizard control. How to make the entire wizard control as read only or
how to make the one step of wizard as Readonly.
Thanks
|
|
|
|
|
What good is the wizard if it's read only ? Just make the controls in the wizard step read only, doesn't that work ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
pls any one to help me with code on how i can attach my Crystal report in .net 2005 as email attachment. Zoom in Crystal report in web does not work. when the zoom factor is changed on increaded, the report does not show
Im using asp.net2.0
t.aransiola
|
|
|
|
|
i got some problem about my system, when i want save the data, it didn save at database (access)...anyone can help me?
its urgent, leave me an email if can help, thanks...
nick
|
|
|
|
|
Read How to get an answer to your question
only two letters away from being an asset
|
|
|
|
|
You can't be serious. I mean, how on earth can anyone hope to help you based on this. Your code is broken. That's as much as I can tell you, based on the information you provided.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I have dynamically added user controls to the webparts.I have added event handlers to these user controls..
But the events do not fire..
can anyone tell me how do I go about resolving this issue..
Thanks
Jol
|
|
|
|
|
Could please tell me how can I read and write barcode in ASP.NET. More briefly, I got a table name BookInformation where I would like keep.
Very Urgent
Sarfarj Ahmed
|
|
|
|
|
Sarfaraj Ahmed wrote: Very Urgent
People around here respond voluntarily, saying its urgent is just rude and will more than likely get your question ignored.
There are plenty of barcode reading/writing examples available. Have you tried a search?
only two letters away from being an asset
|
|
|
|
|
That's very interesting, Here try this Link^
|
|
|
|
|
Hi,
I'm new for ASP.NET and for Using C#.
I'm trying to create Web Project that have Log in form and return user ID
("UserID"), User TypeID ("fUserTypeID") ,User SecurityLevel
("UserSecurityLevel") ,User Fullname ("ShowName") from SQLdb, usind DAL.
i DrugAndDrop ObjectDataSource named/ID ObjectDataSource1 and then connect
the GridView in to it.
The ObjectDataSource1 is working with DAL (running with SP) and get 2
parameters (UserName, Password)
and return UserID and UserFullName.
the code:
<%--Start GridView--%>
<asp:gridview id="GridView1" runat="server"
autogeneratecolumns="False" datakeynames="UserID"
="" datasourceid="ObjectDataSource1">
<columns>
<asp:boundfield datafield="UserID" headertext="UserID"
insertvisible="False" readonly="True"
="" sortexpression="UserID">
<asp:boundfield datafield="fUserTypeID" headertext="fUserTypeID"
readonly="True"
="" sortexpression="fUserTypeID">
<asp:boundfield datafield="UserSecurityLevel"
headertext="UserSecurityLevel" readonly="True"
="" sortexpression="UserSecurityLevel">
<asp:boundfield datafield="ShowName" headertext="ShowName"
readonly="True" sortexpression="ShowName">
<asp:objectdatasource id="ObjectDataSource1" runat="server"
oldvaluesparameterformatstring="original_{0}"
="" selectmethod="GetData"
typename="Dal_Class_For_AspNet_Agent.dsNWTableAdapters.AspNet_Xnet_sp_Agent_LoginTableAdapter">
<selectparameters>
<asp:controlparameter controlid="inputUserName" name="UserName"
propertyname="Text"
="" type="String">
<asp:controlparameter controlid="inputPassword" name="Password"
propertyname="Text"
="" type="String">
<%--End GridView--%>
I manage to make it work and see the data in GrideView.
But what i like to do, is to get the return data as Recordset / Parameters
and put them into 2 separate SESSIONS, so i will be able to
print out at the top frame of the page the UserFullName and keep in SESSION
the UserID for later validation.
Can You please advice with sample code ?
|
|
|
|
|
Hi Guys,
how do i go about implementing a single sign on application in C#(ASP.net)
-- modified at 11:17 Monday 24th September, 2007
|
|
|
|
|
What do you mean ? You want only one login ? In that case, you can easily hard code it.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
hello all,
i want to change datafield property of a boundfield in a gridview at run time from codebehind in asp.net + C#. actually i have a grid view which have 2 bound fields(columns), datafields of these 2 columns are already set. i want change thier datafields after running the application based on some redio button selection. my gridview is like this:-
<asp:GridView ID="gvSavedCriteria" runat="server" AutoGenerateColumns="False" BackColor="InactiveCaptionText"
Height="1px" Width="325px">
<Columns>
<asp:TemplateField HeaderText="Add">
<ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
<HeaderStyle HorizontalAlign="Justify" VerticalAlign="Top" />
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" EnableViewState="true"/>
</ItemTemplate></asp:TemplateField>
<asp:BoundField DataField="ClientNumber" HeaderText="ClientNumber" />
<asp:BoundField DataField="ClientName" HeaderText="ClientName" />
</Columns>
<HeaderStyle BackColor="#2A76B2" ForeColor="White" />
<AlternatingRowStyle BackColor="White" BorderColor="Gainsboro" BorderStyle="Solid" /></asp:GridView>
in this i have two datafields "ClientNumber" and "ClientName" which at run time i want to change to some "ABC" and "XYZ" based on user action. does anyone knows that how can i get it?
People often say that motivation doesn't last. Well, neither does bathing - that's why we recommend it daily
Akhilesh Singh
|
|
|
|
|
Hi!
You just need to traverse thru each row of your datagrid and then change the data according to your need.
foreach (GridViewRow gvRow in dgTestGrid.Rows)
{
// Get the check box from 0th column in current row of grid
CheckBox cb = (CheckBox)gvRow.Cells[0].FindControl("CheckBox1");
if(cb.Checked)
{
// change the data in 1st & 2nd cells of current row according to check box
// 1st cell is for Client number and 2nd is for Client name
gvRow.Cells[1].Text = "ABC";
gvRow.Cells[2].Text = "XYZ";
}
}
--------------------------
Hope this will help.
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
<b>Hi....Friends ..bacically i know only the ajayx file is used to set some global variables & application level settings.How it will be usefull in remaining applications in .Net , How to implement it in java script & can u please give me some examples on this to clear this concept.....Thanks & Rgards</b>
......Varma
varma
|
|
|
|
|
AJAX is a technology to communicate between the browser and the server. There is no such thing as an "ajax file", so you have to specify what you mean. Perhaps you have mixed it up with the global.asax file?
---
single minded; short sighted; long gone;
|
|
|
|
|
Yes this is a cross post :P Yes that does make me a hypocrite :P
But at the end of the day whilst the Visual Studio forum is the correct place for this question, it's much more likely to get answered in here because theres less traffic in the VS forum so bleh :P
---
Anyone know of an easy way to add a post-build event to a webservice project?
With a normal project I'd just use the property pages :/
|
|
|
|
|
How to publish the site or project in ASP.NET for uploading
|
|
|
|
|
Right click on the project name in Solution Explorer and then select publish website option from the menu. Select the location in your hard drive and click OK. It will compile your files and store them in the above specified location.
Then you can direcly upload these compiled files on the web server.
Hope this will help.
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
Helo Sir,
Right click on the project name in Solution Explorer not leading or displaying the publish website option.............
I'm using ASP.NET1.1. The way you suggest me would work in ASP.NET1.1
Thnx
.........
|
|
|
|
|
Sorry! I wrote it for .net2.0
In ASP.Net1.1 you need to make a build of your site. Just follow these steps...
1. Open the project for which you want to publish.
2. Goto File menu-> Add Project-> New Project-> Select "Setup & Deployment" from left pane and then select "Web Setup Project" from right.
3. Specify the name(for eg. MySetup) and location(say d:\setups) where ever you want and click OK.
4. Now, look into the solution explorer. Another node named "MySetup" shd get added in the bottom of your solution explorer tree.
5. Now right click on "MySetup" and click on Add and then "Project Output".
6. Select "Primary Output" and "Content Files" from the menu and click Ok.
7. Now click on Build from menu bar of visual studio and select "Configuration Manager".
8. You can see an entry for "MySetup" along with your actual project.
9. Set configuration to "release" for "MySetup" and click OK.
10. Now rebuild your solution.
11. After successful rebuild, goto "d:\setups" you can find a folder named "MySetups" out there.
12. Go inside that folder. There should be a folder named "Setup". You can find one .exe and one .msi files inside setup folder.
13. Now you just need to run that .exe file and install your project in wwwroot folder of your system.
14. Now you have installed your project and compiled files can be found in wwwroot folder.
15. you just need to upload these compiled files.
-----------------------------------------------
Best of Luck
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|
|
After point No.- 10
Sir i created my project Setup in "C:\ManojSetup"....
and in tht folder there are two sub-folders say Debug and Release
Further there is also a "Setup.exe" and i've run that .exe
----------
13.) Now you just need to run that .exe file and install your project in wwwroot folder of your system.
but which project is to be uploaded. Which is in Inetpub\wwwroot or ........
Plz don't mind actually i don't know how to do it and it's my first turn as well.........
|
|
|
|
|
1. You need to install the setup from Release folder.
2. You need to upload from Inetpub\wwwroot folder.
“The woods are lovely, dark and deep. But I have promises to keep, and miles to go before I sleep.”
|
|
|
|