|
what do you mean by
a-+s-+p-+ wrote: a custom tool
Mohamed Gouda
Egypt
|
|
|
|
|
sorry i meant with asp:gridview you can use HeaderText and then just put some text in
or do you mean a tooltip?
|
|
|
|
|
Thanks .. it works
I just want to clarify the situation to make the discussion usefull for others.
The code should look like this:
myDataGrid.Columns[i].HeaderText = myCustomHeader;
where i is column index
Also make sure to call the DataBind() method after the above code NOT before it.
I like code project, espicially this message board
Mohamed Gouda
Egypt
|
|
|
|
|
Glad I could point you in the right direction!!
happy programming
|
|
|
|
|
Hi,
I have a nested datagrid which has drop down lists inside it. Which are populated as follows...
Private Sub loadSystemsTables(ByRef dg As DataGrid)
'loads the dropdownlists for the editors
Dim db As New database
Dim SystemDS As DataSet
Dim evtHandle As New DataGridItemEventHandler(AddressOf childItemDataBound)
Dim SystemsSQL As String
If Not dg Is Nothing Then
'we have a DataGrid
SystemsSQL = "SELECT * FROM tblSystems"
SystemDS = db.db_getDataSet(SystemsSQL)
AddHandler dg.ItemDataBound, evtHandle
dg.DataSource = SystemDS
dg.DataBind()
Else
MessageLabel.Text = "Couldnt find DataGrid"
MessageLabel.UpdateAfterCallBack = True
End If
End Sub
Public Sub childItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs)
'Dim sysID as integer
'Dim lbl As Label
'lbl = e.Item.FindControl("SystemsIDLabel")
'If Not lbl Is Nothing Then
' sysID = lbl.Text
'End If
Dim ddl As Anthem.DropDownList
ddl = e.Item.FindControl("RoleDropDown")
If Not ddl Is Nothing Then
loadRoleEditors(sysID, ddl)
End If
End Sub
Inside the inner datagrid I have the following items...
<anthem:label runat="server" id="SystemIDLabel"><![CDATA[<%#Container.DataItem("SystemID")%>]]>
<anthem:dropdownlist runat="server" id="RoleDropDown" cssclass="DDLSize5">
What I need to know is how to get the value of the "SystemIDLabel" label so I can pass it to the loadRoleEditors sub as I need to set the drop down lists to previously selected values. The value is displayed when the code is run, but if I uncomment the section in sub childItemDataBound() then I get Null. What I think is happening is the sub is running before the value is inserted into the datagrid.
Anyone know how to get this, or is there another way.
Cheers
Andy
|
|
|
|
|
Hi in vs2003 form body have grid layout,
So with that we will drag and drop our controls on where weneed that place...,
But in vs2005 its flowlayout,
So its not possible to drag anddrop in our controls are where we need?
And one more doubt thing, when we will create one project in vs2003 it will create bin folder also in that dll file will be create during compilation time...,
But in vs2005 i create one site in that i didnt get bin folder and where the dll file will be there?,
Plz any one help me for vs2005
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
I'm designing a web page where i've taken a Log Out button on Information Page if the user click on this button the user is redirected to the Home Page and it's working as i want to. But there is a problem, i can again be appeared in the page(Information Page) through the Back button given above i do not know that's bar name........
Please Suggest Some way(s)
|
|
|
|
|
.NET- India wrote: given above i do not know that's bar name
The Browser Toolbar.
You can not avoid back buttons. You can work around it by having a history.forward() snippet and page cache expiries.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
not getting
Please explain it .........
Thanks for your post
|
|
|
|
|
trying researching what he has suggested on google
|
|
|
|
|
I've set the page no-cache on page load and it's working fine in Internet Explorer but not running fine in mozilla as i've described below please have a bit of your precious time....
1.) I've a folder named Admin in this folder i've around ten web forms which can only be accessed by the administrator the first web form(after the successful login id and password) there are some more links on this web form e.g Top(one of the link) as i click on this Top link another web form opens and now if i click on the Log Out button then it opens the first web form Top if i use Back Button
plz suggest what should i do......
2.) I have a link for Change Password if the admin wants to change his/her password he/she can do this link show a Div on the form once the admin change his password and then click on the LogOut button and then use the back button then it show the Div again but it must not show it because the page is not being cached
This is my code to no-cache
Response.Buffer = true;
Response.ExpiresAbsolute=DateTime.Now.AddDays(-1d);
Response.Expires =-1500;
Response.CacheControl = "no-cache";
Please have a bit of your precious time ...........
|
|
|
|
|
Hi buddy,
You can use sessions, cookies or application to handle that problem.
Google on it
Regards,
Tagore
modified on Monday, March 3, 2008 8:28 AM
|
|
|
|
|
I'm using Session to logout
Session["UserName"] = null;
Response.Redirect("../Admin/HomePage.aspx");
and in Page Load i check whether or not Session["UserName"] is empty it is then redirect to home page otherwise the user to visit the information..........
But still it's not working in best of it's way...........
|
|
|
|
|
the browser back button will take you back to the page you were just on without going back to the server and re-loading the page, therefore the onload will not run again until the page is refreshed.
The only way i can think is to somehow delete the cache or apply some sort of method to run when the browser back button runs
|
|
|
|
|
check this article out:
http://www.codeproject.com/KB/aspnet/NoCaching.aspx
|
|
|
|
|
try this in Page Load
if(Session["UserName"] == null && Page.IsPostBack)
Response.Redirect("../Admin/HomePage.aspx");
|
|
|
|
|
Sir i have created a Table of Infomation with colomn name (Firstname, Lastname, CellNo, Address)
i use this code to display values in Gidview
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
lblError.Text = ""
BindData()
End Sub
Protected Sub BindData()
Dim connectionString As String = myDataSource.ConnectionString
Dim myConnection As New SqlConnection(connectionString)
Dim ad As New SqlDataAdapter("Select ID,FirstName,LastName,SQuestion,Answer,CellNo from Information", myConnection)
Dim ds As New DataSet()
ad.Fill(ds, "Information")
grdView.DataSource = ds
grdView.DataBind()
End Sub
I am Using Code In aspx File like this
<asp:SqlDataSource ID="myDataSource" Runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>">
</asp:SqlDataSource>
<asp:Label ID="lblError" runat="server" Text="Label"></asp:Label>
<br />
<asp:GridView ID="grdView" runat="server" AllowPaging="True"
AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" PageSize="5">
</asp:GridView>
It is working Good But i use Row Editing then I have no idea how Update these valus in Gridview. Please Help me if you can
Regards
Ahsan
|
|
|
|
|
Hi,
I am developing a application, in which i have to fetch some records from a remote database through web service and then on basis of that data i have to insert some records in our local database and after that i have to mark the remote data that inserted into local db so that it does not comes again.
So in this process after inserting inot local DB if error occurred while doing updation on remote data, then process should be rollback.
that is the issue. I tried using Enterprise Services, but it didn't work, trnsaction won't get rollback.
Can it be possible using WCF?
Please help regarding that.
AKS
|
|
|
|
|
amit_sahu wrote: Can it be possible using WCF?
No. WCF has nothing to do with database updates. It deals with communicating with things.
amit_sahu wrote: trnsaction won't get rollback
It was probably already committed. You might want to read up on using transactions in ADO.NET.
|
|
|
|
|
Dear Sir,
I am doing Payment Gateway Integration on my system
so for that I have registered one dll on my system.
Payment Gateway Integration is working properly on my system.
Now we have uploaded it on live server but it throw one execption.
Execption is:-
The Server threw an execption (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
It may be due to missing file or any other reason.
Please suggest me.
Thanks.
Sukhjeevan Singh
|
|
|
|
|
Hello Sir/Mam
some one please provide me the full source code for connecting oracle 9i and asp.net 2.0 so that i will be greatful to those who send code without not just sending only connection string alone
please
regds
venkat24
|
|
|
|
|
If you can't work it out from any of the many full examples that you can find with google, odds are good you should stop wasting your time with trying to write code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
Hi All!
I have to put a validation for Australian License Number.It's required format is as per below.
Validation Maximum length of 9 characters.<br />
Alphanumeric characters only.<br />
Must have at least 4 numeric characters.<br />
Must have no more than 2 alphabetic characters.<br />
The third and fourth characters must be numeric.
can anyone please suggest any custom validation or javascript ?
Thank you,
Regards..
|
|
|
|
|
Sounds like a regular expression to me.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|