|
If u don't have image for the particular record.Then do the followiunf thing.
U have a function named Visible for the image control.Write a return type function for that Visible function
in the html view.
now in the code behind file
include the imports system.io
publilc function FindVisibility(byval filepath as string)
if(path.exist(filepath))
return true
else
return false
End sub
Hope this may help u.
|
|
|
|
|
Thanx a lot amaneet.
It is done!
Vivek Khare
|
|
|
|
|
i would really love to use SOAP extensions, but i cannot seem to configure them so that ProcessMessage ever gets called. If anyone would be willing to help i can send a zip file of the smallest example i can construct from the MSDN documentation. The sample compiles. The service page loads. The webmethod gets called, but neither ProcessMessage nor any of the other SOAP extension code gets called.
|
|
|
|
|
Sir,
I am trying to write a web app that allows the user to capture audio from the client machines microphone. Can u help me how to captures the audio.
Thanks
|
|
|
|
|
I'm using C# and ASP.Net in all of this.
So I'm basically not internalizing the concept, there's missing steps in the samples or I'm just thick.
Here's what I think I want to do:
1. I have a page MediaGallery.aspx in it I have 20 Image controls.
2. I want to pull images from SQLServer using a streaming ImageStream.aspx page that writes out the image as a byte[] stream.
3. The Page_Load event of the ImageStream.aspx will use a query string to parse the ImageID and pull the image from the sqldb and stream it out.
4. ImageX (where x > 0 < 21) will have it's .ImageURL = "ImageStream.aspx?ImageID=x".
My questions go like this. How exactly (please show me with some code if you don't mind) do I do this iteratively so that I can fill all 20 Image controls with the correct image and not have 20 instances of ImageStream.aspx? How do I close that page? Do I need to? How do I do this gracefully? I'm guessing since the Page_Load event of ImageStream.aspx outputs a binary stream that ImageStream.aspx never gets created as a page it just becomes a binary stream and that's that. If so how do I dispose of that stream or do I let the CLR manage that?
If someone could provide a snippet that shows how to link that up that would be really cool.
- Rex
|
|
|
|
|
I would have said create your own HttpHandler to avoid the overhead of creating a Page instance, but then I found this article[^].
|
|
|
|
|
Hi. how can i create nested datalists? i test some codes but they didn't work.
thanks..
|
|
|
|
|
1. You will need to include you child data lists as a control in your list's item template.
2. Then handle the OnItemDataBound event
3. In the ItemDataBound event use the FindControl method to get the child data list.
4. Bind the child data list to the appropriate data source (i'm assuming some table filtered using a data relation or some similar method of filtering data)
|
|
|
|
|
This is pretty simple...
i have an aspx page with 2 controls - a button and a dropdownlist.
i want the user to choose something from the list and press the button in order to execute the chosen operation and retrive the HTML result.
it is working fine, but what i want to do, is sending to the client the new page (the result of the operation he chose) but to still keep these controls where they are (i want the results to be displayed beneath these controls.
what is the best way to do that?
Thanks.
|
|
|
|
|
You can use any number of controls to do this. I suggest using a div tag like
<div id="content" runat="server>
</div>
and then content.innerHTML = YourHTMLString;
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
I would recommend using <asp:Panel> which renders as a div but has more strongly typed methods. Also, while it contains no data I would set it to not be visible.
i.e. under your current HTML
<asp:Panel runat="server" ID="pnlData" Visible="false" />
Then when you get the data back use:
pnlData.innerHTML = YourHTMLString;
pnlData.Visible = true;
in your code behind.
|
|
|
|
|
I am extremely new to the ASP.NET arena and I am trying to write a web app that allows the user to capture audio from the client machines microphone. I wrote the code that captures the audio and now I am trying to incorporate it into my ASP.NET app. The issue I am having is trying to find a way to run the server code (to capture audio) on the local machine without being too invasive or without fully downloading an .exe on the client machine. Is this possible?
Lawrence.
|
|
|
|
|
Lawrence,
You would have to get an executable on to the client machine to do this, or use an existing one (such as Flash, which has microphone support). Any commercial plug-in will be designed prompt the user before allowing you to listen in.
Best,
DTrent
|
|
|
|
|
DTrent, thanks for the response. I will give it a shot.
|
|
|
|
|
Hey all
I have a gridview on my page which the you can filter. This all works fine, however when your filter returns no results the whole table disappears. Is there anyway to keep the header row visible instead of the blank screen?
Thanks in advance
|
|
|
|
|
This is how I've done it in the past:
Always include one blank or dummy row at the very beginning of the gridview's datasource datatable. Then in the gridview's RowDataBound event add code to check if it is the first row, and if it is to hide it. It would look something like this:
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
Select Case e.Row.RowType
Case DataControlRowType.DataRow
If e.Row.RowIndex = 0 Then e.Row.Visible = False
End Select
End Sub
Since the gridview has a row it will display the headers, but the row itself will be hidden.
|
|
|
|
|
Hello
I am getting the following error when I try to run my project:
Error: Project Is Not Configured To Be Debugged
I have set debug = "true" in Web.Config and also set my IIS->directory->Execute Permissions to Scripts only as advised by many other sites.
However this has not fixed my error. The Web.Config file also seems to be correct in its structure and syntax.
Just wondering if any one has had similar promblems and how they resolved them or if any one can point me in the directions of solutions i haven't tried yet
Oh i am running windows XP, VS2003.NET with version 1.1 of the .NET framework and the project uses WSE 1.0
Thanks
Dan
|
|
|
|
|
On my machine, I have set "script and executable".
Also, try to attach to the process (aspnet_wp).
One more thought: check permissions for you website
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Just incase any one stumbles upon this with the same problem - here is how i fixed it.
in IIS->directory for the site i ticked a checkbox script source access and applied it to all child nodes. This did work but every now and then needs undoing and redoing.
Not sure why this worked nor am i sure of the consequences of checking the box so you may want to look into that before blindly following my advice (as it is rarely any good)
ttfn
Dan
|
|
|
|
|
Is there a nice easy way to check Session["x"] exists without trying and catching it?
Thanks.
|
|
|
|
|
no need to use try catch for that they are there for different purpose.
You can check the session like this:
if(Session["x"]!=null)<br />
{<br />
}
Best Regards,
Apurva Kaushal
|
|
|
|
|
Oh my I feel like an idoit!
I could have sword i tried that and it gave me an error for referencing a somthing that didn't exist
but that error was caused by another bug
Thanks for pointing it out for me
|
|
|
|
|
Always welcome..
Best Regards,
Apurva Kaushal
|
|
|
|
|
Imagine the key has not been added on the session at all, that time do we need to user only try...catch block or is there any other way will work?
Ram
|
|
|
|
|
No in that case also you can check the session like that(what I mention).
Best Regards,
Apurva Kaushal
|
|
|
|