|
I don't know why are you using like that becauise onrowdatabound event gets executed for all the rows of the gridview and if inside that event again if you are looping through all the rows then it seems unnecessary and also will cause a performance issue.
Apurva Kaushal
|
|
|
|
|
Hi,
I am checking users on my page load. If my condition fails, I have to stop the page loading and I dont want to display any of my controls too. For this purpose, I dont want to redirect my page. What I have to do. What about response.End
If I use response.end, I am getting error msg as "cannot obtain value". What I have to do?. Pls help.
Balasubramanian K.
|
|
|
|
|
BalasubramanianK wrote: dont want to redirect my page.
Ohh- redirecting to other page is a neat solution.
Put two panels, first panel contains all your controls and second one contains your error message which will be displayed when condition fails. Now toggle these panels visibility after checking the condition.
|
|
|
|
|
Thank you..
Balasubramanian K.
|
|
|
|
|
Hi,
you can put all of your controls inside a div and set it's visibility depending up on your condition.
<div runat="SERVER" id="divFull">
controls
</div>
divFull.Visible = condition;
Regards
Nirandas,
a developer from India.
|
|
|
|
|
Thanks for your reply..
Balasubramanian K.
|
|
|
|
|
Hi All,
Can you please share me the code to download file in ASP.net
Thanks in Advance
|
|
|
|
|
Kumar002 wrote: Can you please share me the code to download file in ASP.net
No
What do you mean download a file from sql server? you mean from the database yeah?
Do you want this to be a function that your users can perform?
|
|
|
|
|
try this code. i assume that file is stored in binary form in sqlserver
Const SQL As String = "SELECT * FROM Pictures where id=8"
Dim myCommand As New SqlCommand(SQL, con)
con.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader
If myReader.Read Then
Response.Clear()
Response.AddHeader("Content-Disposition", "attachment; filename=" + myReader("FileName"))
Response.ContentType = "application/octet-stream"
Response.BinaryWrite(myReader("ImageData"))
Response.End()
End If
myReader.Close()
con.Close()
|
|
|
|
|
Thanks for your reply,
I need to list all the files from that directory and from that list i should give a option to download the respective files.
actuvally i am a biginner so i dont have other chioce thatn posting these if you can give me an ex that wouls be great.
|
|
|
|
|
Kumar002 wrote: I need to list all the files from that directory
Use Directory.GetFiles() method. If you just provide a link to the file, it gets downloaded.
|
|
|
|
|
.fixedHeader
{
overflow: auto;
height = 10px
}
table th
{
position: relative;
top: expression(this.parentNode.parentNode.
parentNode.scrollTop-1);
}
using this css iam able to get the fixed header for my grid but the problem is that iam having a grid with the panel out side .. the grid view header is getting fixed but it going over the panel start point where it is not looking nice how to get the grid header with in the panel ..
|
|
|
|
|
and what is your question?
|
|
|
|
|
hii
Can anyone tell me which reference or namespace i use for ConfigurationNamingContext. my code is as below:-
Private Function ResolveNetBiosNameToDN(ByVal netbiosName As String) As String
Try
Return DirectCast(GetDirectoryEnTry(String.Format("CN={0}, CN=Partitions, {1}", netbiosName, DirectCast(ConfigurationNamingContext.Properties("distinguishedName").Value, String))).Properties("nCName").Value, String)
Catch ex As System.Runtime.InteropServices.COMException
If CInt(ex.ErrorCode) = 2147950640 Then
Throw New ArgumentException("The given netbios name was invalid", "netbiosName", ex)
Else
Throw
End If
End Try
End Functio
|
|
|
|
|
Hi All,
I have a web service developed using VS.Net 2005, when I put a break point in it and try to run it. It is not going to the break point it is not going into the function itself only. I am able to understand that it is becos of some settings but it will be helpfull if anybody can suggest me what settings do I need to change.
My application is not using Filesystem but http. Any sort of help will be very supportive. thanks in advance.
\
Aleem Mohammad.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Are you running the WS through browser by taking the URL directly ? If yes, the break points won't get hit. Make sure you are running the application via VS.
|
|
|
|
|
Hi,
Yes I am trying to run it through VS only still it is not going to the break point. Even I am also wondering. And below given is my Web.config file
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="PathToWriteXML" value="E:/Aleem/"/>
<add key="passWordXMLPath" value="E:/Aleem/"/>
</appSettings>
<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true"/>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
</configuration>
Thanks,
Aleem Mohammad
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Are you able to "Step into" the code ? When you set break points and run the application, VS usually changes the break point color when it finds any problem in hitting it. You will get the error description if you move mouse over to that icon.
|
|
|
|
|
Hi,
No I am not able to get in to the code but the application is running and giving its output when it is called from another application. Please advise me.
Thanks for the help.
\
Aleem Mohammad
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
indian143 wrote: application is running and giving its output when it is called from another application
what do you mean ? Create a simple console application and try to step into the code (F11). If it's not working, I guess your IDE has some issues.
|
|
|
|
|
Hi,
Now it is working when I put an unneccessary sample function with some return value. It is going in to the break point. I am confused whats wrong. Thanks Navneeth.
\
Aleem Mohammad.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Hi
I was just starting to enjoy programming (newbie c#) as I discovered the benefits of using debugging in Visual Studio. Well now the debugging is not working and I'm getting errors on things which I know are correct and worked before (think I'm going mad!). Anyway, all my breakpoints have turned into empty circles with exclamation marks and when you roll over them you get:
'The breakpoint will not currently be hit. No symbols have been loaded for this document.'
I have even loaded the pages I'm working on into another project but still get the same so think the problem is with Visual Studio in general. Has anyone out there got any ideas on how to resolve this or should I just try and find another job?!
Thanks in anticipation,
Lorna
|
|
|
|
|
check this article out, think it will help you
http://geekswithblogs.net/dbutscher/archive/2007/06/26/113472.aspx
|
|
|
|
|
Thanks for your prompt response - I had come across that article but I can't follow the line:
While debugging in Visual Studio, click on Debug > Windows > Modules. The IDE will dock a Modules window, showing all the modules that have been loaded for your project.
I have only got Breakpoints, Watch, Locals, Call Stack and Threads in my Debug, Windows menu!! I'm running VS 2005 Team Edition for Software Developers. Any ideas?
|
|
|
|
|
Make sure you are compiling in debug mode not release mode
Click Menu item and then configuration manager to change the confiuration for the setup
Other then that google your error message and you will get loads of results where previous people have had same problem
|
|
|
|