|
sory sir for calling mam .... actually iam having columns whic are string data type ...
|
|
|
|
|
You can have one more column for ID and can make that column auto generated and sort it accordingly.
Apurva Kaushal
|
|
|
|
|
sir will u guide me how to do now i created a row with a id wehn a new row is genarated it is getting 1,2,3,.... now plz gudie with code how to sort the auto genrated columns
|
|
|
|
|
You can do it some how like this:
string strExpr;<br />
string strSort;<br />
<br />
strExpr = "id > 5";<br />
strSort = "name DESC";<br />
DataRow[] foundRows = <br />
customerTable.Select( strExpr, strSort, DataViewRowState.Added );
Apurva Kaushal
|
|
|
|
|
sir will u guide me how to do now i created a row with a id wehn a new row is genarated it is getting 1,2,3,.... now plz gudie with code how to sort the auto genrated rows
|
|
|
|
|
can anyone help me to upload the image file in my project folder
|
|
|
|
|
Ravi_21 wrote: my project folder
You can only upload the file to Web server.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
sir so tell me the code for the file upload in the server
|
|
|
|
|
If you just want to ask something from a particular person then reply to his thread.
Apurva Kaushal
|
|
|
|
|
You can take help from Here[^] for uploading a file.
Apurva Kaushal
|
|
|
|
|
Hi need to create navigation that gets populated via database and is role based. below is the sql
CREATE TABLE [TopMenu] (
[MenuID] [int] IDENTITY (1, 1) NOT NULL ,
[Text] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Description] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ParentID] [int] NULL ,
CONSTRAINT [PK_Menu] PRIMARY KEY CLUSTERED
(
[MenuID]
) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO TopMENU
Select 'Property','Property', NULL
UNION ALL Select 'Portfolio','Portfolio', NULL
UNION ALL Select 'Capital Expenditure','PortfolioCapex', 1
UNION ALL Select 'Depreciation','PortfolioDepreciation', 1
UNION ALL Select 'Condition Audit','PortfolioCondition', 1
UNION ALL Select 'Historical Expenditure','PortfolioHisEx', 1
UNION ALL Select 'Property Details','PropertyDetail', 2
UNION ALL Select 'Assets','PropertyAsset', 2
UNION ALL Select 'Depreciation','PropertyDepreciation', 2
UNION ALL Select 'Capital Expenditure','PropertyExpenditure', 2
UNION ALL Select 'Insurance','PropertyInsurance', 2
UNION ALL Select 'Documents','PropertyDocuments', 2
UNION ALL Select 'Capex','PortfolioCapex', 3
UNION ALL Select 'Graph','PortfolioCapexGraph', 3
UNION ALL Select 'Graph','PortfolioDepreciationGraph', 4
UNION ALL Select 'Current Depreciation','PortfolioDepreciation', 4
UNION ALL Select 'WDV & Depreciation','PortfolioDepreciationWDV', 4
UNION ALL Select 'Assets','PropertyAsset', 8
UNION ALL Select 'Capex','PropertyCapex', 8
UNION ALL Select 'Depreciation','PropertyDepreciation', 8
UNION ALL Select 'Condition','PropertyCondition', 8
UNION ALL Select 'Expenditure','PropertyExpenditure', 8
UNION ALL Select 'Disposed','PropertyDisposed', 8
UNION ALL Select 'Capital Ex','PropertyExpenditure', 10
UNION ALL Select 'Capital Ex Graph','PropertyExpenditureGraph', 10
GO
now clearly, I will have two top level navigation
property and portfolio. both property will have subsequent navigation and those subsequest navigation may or may not have another sets of navigation.
I need to display in a row style not in a drop down style for eg. If I am in portfolio link the navigation structure should be as below
Portfolio
Capital Expenditure | Depreciation | Condition Audit | Historical Expenditure
Capex | Graph
by default Capex should be selected. it should also highlight Portfolio, Capital Expenditure and Capex as Capex's parent is Capital Expenditure and Portfolio
I was thinking of using a 3 level datagrid. could someone please help me I am using asp.net 2.0 web application project with vb.net and sql server 2005
thanks in advance
|
|
|
|
|
|
Hope you can help me in this problem. I have a textbox that is used to search values in a grid. That is, if i type a key in textbox all rows starting with what i have typed in text box should only be there in the grid. I know its easy in Vb.net. the textchanged event of the textbox will help. In ASP.net this event gets fired only when we go out of the textbox not at the instant we type a key.Is there any solution for this?
|
|
|
|
|
Hi,
You need to use callback to server.
you need to use AJAX. A good option is to use microsoft's implementation of AJAX(codename ATLAS).
Check here: http://ajax.asp.net/
|
|
|
|
|
Hello,
The customer wants to download a music file for a path that is on the server, then play that in the web form. So it will be like having window media player embedded in the web form itself.
I have the code for downloading and playing. However, a dialog will popup and when they click open it will play the music. However, the customer doesn't like this and want to play the music in a player that is in the web page itself.
Here is my code so far for downloading and playing the music.
Many thanks
<br />
Try<br />
Dim fs As FileStream = Nothing<br />
Dim contentType As String = String.Empty<br />
'Dim path As String = "\\10.10.10.31\Inetpub\wwwroot\csone\images\Content\"<br />
'Dim fileName As String = "Voice.mp3"<br />
Dim path As String = "C:\DownloadPicture\"<br />
Dim fileName As String = "Beethoven.wma"<br />
<br />
<br />
fs = File.Open(path & fileName, FileMode.Open)<br />
Dim fileBytes(fs.Length) As Byte<br />
<br />
fs.Read(fileBytes, 0, fs.Length)<br />
fs.Close()<br />
<br />
Response.AddHeader("Content-disposition", "attachment; filename=" & fileName)<br />
Response.ContentType = "application/octet-stream"<br />
Response.BinaryWrite(fileBytes)<br />
HttpContext.Current.ApplicationInstance.CompleteRequest()<br />
<br />
Catch ex As Exception<br />
MsgBox(ex.Message)<br />
End Try
|
|
|
|
|
|
Use an EMBED tag and the SRC should be
playmusic.aspx?musicfile=someid
Depending upon this querystring, appropriately stream the MP3 by setting the MimeType properly.
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
|
|
|
|
|
Hi in my web.confif file i given session timeout...,
when the session timings out its redirect to the login page...,
But same statement if i use in my server system,its not considering the session part...,
This is my webconfig file contained session part:
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:41414" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/>
whats the probs why its not accept the session part in server system?,
-- modified at 23:55 Monday 26th November, 2007
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
Hai all in my application i am using Menu control.I am binding this menu with xml.
i need to hide some of the menu in my menu control based on one flag in my xml string.
From database i am taking that flag as a xml attribute in the same xml which i use to bind the menu.
Plse Help me
Thanks in advance
Lijo Rajan
|
|
|
|
|
xml file :
<one>
<two>india</two>
<three>america</three>
</one>
first ,the freetextbox should contain the xml file in pageload, i.e it displays
.india
.america
then when i change "india" or "america" to some other text then it should modify in the xml file after i click the button.
[i want to update the xml file i.e modify the the content in the child nodes i.e <two> and <three> using the freetextbox control. ]
|
|
|
|
|
I am having a little problem.... I have formview and within the ItemTemplate of the formview I have a tables with different controls. I won't to be able to loop through the formview and depending on the type of control do something with it. When I loop through it, it only says there are one control which is the table... Here are some snipetts.
<asp:FormView ID="FormView1" runat="server" Width="600" DataSourceID="dsCoursesAll" DataKeyNames="CourseID">
<ItemTemplate>
<table id="ScoreCard" runat="Server" class="ScoreCard" width="600">
<tr id="trScoreFrontNine">
<td>Score</td>
<td><asp:TextBox ID="txtScoreHoleOne" runat="Server" MaxLength="2" Width="55" /></td>
<td><asp:TextBox ID="txtScoreHoleTwo" runat="Server" MaxLength="2" Width="55"/></td>
<td><asp:TextBox ID="txtScoreHoleThree" runat="Server" MaxLength="2" Width="55"/></td>
<td><asp:TextBox ID="txtScoreHoleFour" runat="Server" MaxLength="2" Width="55"/></td>
<td><asp:TextBox ID="txtScoreHoleFive" runat="Server" MaxLength="2" Width="55"/></td>
<td><asp:TextBox ID="txtScoreHoleSix" runat="Server" MaxLength="2" Width="55"/></td>
<td><asp:TextBox ID="txtScoreHoleSeven" runat="Server" MaxLength="2" Width="55"/></td>
<td><asp:TextBox ID="txtScoreHoleEight" runat="Server" MaxLength="2" Width="55"/></td>
<td><asp:TextBox ID="txtScoreHoleNine" runat="Server" MaxLength="2" Width="55"/></td>
</tr>
</table>
Protected Sub btnReset_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnReset.Click
For Each c As Control In FormView1.Controls
If TypeOf c Is TextBox Then
CType(c, TextBox).Text = ""
ElseIf TypeOf c Is CheckBox Then
CType(c, CheckBox).Checked = False
End If
Next
End Sub
|
|
|
|
|
Hi,
Then try to loop through the Table(HtmlTable).
|
|
|
|
|
Hi,
I have a series of pages to create that will each have a bunch of listboxes on them, each containing a listing of files in a directory. I'm trying to get the page down to basics where i only have to plug in the correct paths to the folders, but I'm hitting a problem casting 'object sender' to a listbox - the SelectedItem is always the first item, not what was actually selected.
here is the entire code-behind (stripped down to basics):
public partial class departments_safety_play : System.Web.UI.Page {
private static readonly string year = DateTime.Now.Year.ToString();
private static readonly string root = @"../..//FIBRELINE/";
private readonly string pathFibrelineA = string.Format(@"{0}{1}/A-SHIFT/", root, year);
protected void Page_Load(object sender, EventArgs e) {
if (!IsPostBack) {
string folderToBrowse = Server.MapPath(pathFibrelineA);
utilityLib.ShowFilesInWithValue(folderToBrowse, lstFibrelineA, pathFibrelineA);
}
}
protected void lbSelectedIndexChanged(ListBox lb) {
string dir = lb.SelectedValue + lb.SelectedItem.Text;
string popupScript = "" +
"window.open('" + dir + "', 'CustomPopUp', " +
"'width=600, height=500, menubar=1, resizable=1, location=1')" +
"";
ClientScript.RegisterStartupScript(GetType(), lb.SelectedItem.Text, popupScript);
}
protected void SelectedIndexChanged(object sender, EventArgs e) {
ListBox lb = (ListBox) sender;
lbSelectedIndexChanged(lb);
}
}
|
|
|
|
|
Is it possible to loop through a database and display the names of all the tables? If so, please point me in the right direction.
|
|
|
|
|
Please do not respond. I found the solution.
|
|
|
|
|