|
neodeaths wrote: hi iam trying to make a global function where all my asp.net .cs files can use it.
Put your classes in app_code (ASP.NET 2.0 or later) directory which can be accessible from anywhere in the application.
|
|
|
|
|
hi all
help me in this issue...
i have pages with the name default1.aspx and default2.aspx.
from the default1.aspx i have navigated to default2.aspx..
and i have a back button in default2.aspx page.. when i click on back button i should know the previous page (i.e from the page which i have navigated to default2.aspx) and should go there...
can anyone help me in this..
thank you.
siri
|
|
|
|
|
I have page where the users can register with some input fields. I dont want the user to be able to push the backspace button so it navigates to the previous page. How can I do that?
_____________________________
...and justice for all
APe
|
|
|
|
|
hi all,
I have a datagrid with all bound columns and autogenerate columns =false.
The problem is the datagrid headers have not become clickable even afer i have made allow sorting=true.They become clickable only if i make autogenerate columns=true. What can be the problem????
Thanks in adv!!!
|
|
|
|
|
Check whether you have assigned value in the SortExpression of each BoundColumns.
SortExpression might be the column name which is use to sort the GridView.
|
|
|
|
|
<blockquote class="FQ"><div class="FQA"> Venkatesh Mookkan wrote:</div>Check whether you have assigned value in the SortExpression of each BoundColumns.
SortExpression might be the column name which is use to sort the GridView.
</blockquote>
I haven`t explicitly specified the sortexpression in the .aspx page.
for your reference i m giving you the code
Sub FillGrid()
cmd = New SqlCommand
cmd.Connection = con
cmd.CommandText = "List_Party_Info"
cmd.CommandType = CommandType.StoredProcedure
sda = New SqlDataAdapter
sda.SelectCommand = cmd
ds = New DataSet
sda.Fill(ds)
CustGrid.DataSource = ds
CustGrid.DataBind()
Session("Data") = ds
ValidateGrid()
End Sub
above code is used for binding the grid
and the following is the sort command
Private Sub CustGrid_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles CustGrid.SortCommand
Dim ds1 As DataSet = CType(Session("Data"), DataSet)
Dim dv As DataView = ds1.Tables(0).DefaultView
dv.Sort = e.SortExpression
FillGrid()
End Sub
Html Code
<asp:datagrid id="CustGrid" CssClass="datagrid" Runat="server" cellpadding="4" bordercolor="#EFEFEF"
AutoGenerateColumns="False" AllowSorting="True">
<AlternatingItemStyle CssClass="datagrid_row"></AlternatingItemStyle>
<ItemStyle CssClass="datagrid_row1"></ItemStyle>
<HeaderStyle CssClass="datagrid_heading"></HeaderStyle>
<Columns>
<asp:BoundColumn Visible="False" DataField="PARTY_CODE" HeaderText="Code"></asp:BoundColumn>
<asp:BoundColumn DataField="_XXXX" HeaderText="Bill Unit"></asp:BoundColumn>
<asp:BoundColumn DataField="YYYY" HeaderText="Name"></asp:BoundColumn>
<asp:BoundColumn DataField="ZZZZZZ" HeaderText="Role"></asp:BoundColumn>
</Columns>
<PagerStyle Mode="NumericPages"></PagerStyle>
</asp:datagrid>
but this event doesn`t fire..Whate can be the problem???
|
|
|
|
|
As I already told you, SortExpression is the problem. Please define SortExpression for the BoundColumns to which you want Sort option.
|
|
|
|
|
hi i am using c# asp.net visual studio 2005
currently i got a gridview which the data is population promically during the pageload
when i try to change the property of allowsorting to true and test it there is always error when the sorting is being clicked
anyone know why and how to fix this?
modified on Friday, January 18, 2008 5:57:47 AM
|
|
|
|
|
neodeaths wrote: when i try to change the property of allowsorting to true and test it there is always error when the sorting is being clicked
You should handle the Sorting event of the GridView. I am sure, you are not handling that event.
|
|
|
|
|
on accessing session on client side i got follwin error
this expression cause side effect and will not be evaluated error
Gaurav
|
|
|
|
|
How are you accessing the session on the client side?
|
|
|
|
|
|
This is not on the client side - still server side code. Where do you set up your session_name variable? Is there any other information with the exception?
|
|
|
|
|
what is the server side code and client side code where it has to use
sanjeev
|
|
|
|
|
hi,
I have this problem, when I work on my project at work, I usually modify in the xsd file in Visual Studio 2005. I add new stored procedures and stuff like that and they are reflected normally in the database on Sql server.
but when I try to continue my work at home, I fail to refresh my database on my sql server on my home machine, according to the new modified xsd file. I don't want to copy the database from my work pc to my home pc. They both have the same name. So I usually expect it'll work ok and the sql server would detect the changes I made and refresh the database accordingly..how do I manage to do that?
I need to know, cause that would be important when I deploy my web application afterwards..I don't want to take a copy of the database on the server and update on it?
Can someone help?
|
|
|
|
|
in my database there is a numeric type of column , there in the tabe it shows the values in the following format
1
2
3
4
now when i switch over to the crystal reports , the cross tab crystal reports , that numeric field prevents me to format(when i right click o it, if it is a cross tab).
actuallly it shows the data in the following way
1.00
2.00
3.00
4.00
i think i can use the formula fields , can somebody tell me how to use that to strip off the .00 part, or any alternate?
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Hi all,
here i am developing one website, in one page i have one application form if user fills the hal of the form and try to go to the next page then iwant to prompt a message saying "r u sure u want to leave the page" how to achiev this. Actually i have done the same thing for cancel button in the same page. if user trying to go to next page with out filling the page then how to achieve this.
Thanks in advance
|
|
|
|
|
Say u have a button , that propagates u from one page to another, on the form load add the attributes for the onclick function, and write the function in the java scrpt , which will confirm from u , as u have already done before
If you have an apple & I have an apple and we exchange our apples, then each of us will still have only one apple but if you have an idea & I have an idea and we exchange our ideas, then each of us will have two ideas!
|
|
|
|
|
Hi
Use window.onbeforeunload in java script
var flag =0;
var needToConfirm = true;
window.onbeforeunload = confirmExit;
function confirmExit()
{
if (needToConfirm)
{
// check to see if any changes to the data entry fields have been made
var elem = document.getElementById('<%= txtName.ClientID %>');
if(flag == 0 )
{
if(elem !=null)
{
return ("are you want to leave?");
}
}
}
}
rajesh
|
|
|
|
|
I m using asp.net to search content in files with windows indexing service Once I add files in my catalog I can perform search But when ever I add new Files or change existing in catalog directory the search operation doesnt perform on added or edited files this can be done in two ways
1- restart the indexing server
2- Restarting my catalog only
How I can restart my catalog Programmatically in vb.net or C#.net
please help me
hyder_master
|
|
|
|
|
Read through the scenario.
client A wants to read files from another client B present in the same network. But this reading should be done through a ASP.NET web application . In other words a client should be able to read a text file present on another client in the same network.
This scenario would be applicable in an intranet application. The thing to note is that the path of client B would be present in the server. The client A would pick the path from the server and navigate automatically to client B, hunt down the necessary folder and read the text files and store the necessary data in a database.
|
|
|
|
|
v1i9n6o7d wrote: ASP.NET web application . In other words a client should be able to read a text file present on another client in the same network.
It's not possible with ASP.NET, because it is executes at the server side and returns HTML output. It can't access other machines and take files from there.
|
|
|
|
|
v1i9n6o7d wrote: this reading should be done through a ASP.NET web application
Not possible.
Try with any Windows Service/Application to do that. Use .NET for that
|
|
|
|
|
Only if all your clients have shared their C: drives to the network... (not recommended, just in case you're wondering).
|
|
|
|
|
hi all
i want to get the html of a table with its child elements as a string
is it possible?
if yes then please help me
rajeev kumar sharma
vri software pvt. ltd.
new delhi India
|
|
|
|