|
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.
|
|
|
|
|
Ok...
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
I am trying to modify a webpage that includes the AJAX tools, but can not get AJAX installed. I have followed the steps using the Sample Web Site, but when I get to the point of adding the tool to the VS toolbar I get an error. “error loading types from Assembly…” “ Could not load file or assembly ‘System.Web.Extension…’ or one of its dependencies. The system could not find the file specified.”
I have VS 2005 Standard edition and have reinstalled ASP.NET.
Any idea what I might be doing wrong?
David Wilkes
|
|
|
|
|
Never mind, figured it out.
David Wilkes
|
|
|
|
|
Hi,
I have a web service and if my web method catches an exception I then throw a new exception which is passed back to my calling application. Unfortunately though my exception has text XXXXXXX, it gets a load of other stuff added like this:
"System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: ..."
It looks like I'm getting the inner exception trace.
How can I avoid this?
Thanks
|
|
|
|
|
Hi Friends
I am trying to pass value to my Session Variable from Javascript method.
function TestOne
{
var stringOne= "test";
Session.Add("Test", stringOne);
}
I am getting an error Session is undefined.
Any suggestions would be appreicated.
Thanks
Cheers
Menon
|
|
|
|
|
Session is a Sever object not client, so you cannot access it in javascript code. You have to pass the string to the server either through querystring or through any form field and then get it on the server and add it to the session
-----
|
|
|
|
|
Thanks Bhatti,
Can you please tell me how do you call a server side method from the Javascript?
Thanks
Cheers
Menon
|
|
|
|
|
What are you really trying to do? You are in ASP.NET forum which means you have an idea how web forms works. So basically you add a ASP:Button in you page and onclientclick you call the javascript function, in that function you change the value of any hidden field or regular textbox and submit the form. And on server side you add the click handler to the button and in that eevnt handler you get the value of that field.
Please go through quickstart tutorials[^] to understand the whole flow.
e.g. you will call the following javascript function onclicentclick of the button:
<br />
function TestOne()<br />
{<br />
document.myform.stringOne.value = 'stringOne';<br />
docuemt.myform.submit();<br />
}<br />
and on server side in event handler for click event of button you will do this:
<br />
Session["Test"] = stringOne.Value;<br />
-----
|
|
|
|
|