|
Hello Friends
I have stored a file in webserver and its path in database . and tried to retrevie the file using the path. My problem is , i used "Response.Addheader()" to display a dialogbox , i'm able to get the dialogbox but cant able to open the file which is stored in webserver.
how to solve this.
ArunVijay
|
|
|
|
|
Can you provide the source code? Are you getting an error or does it just get stuck?
|
|
|
|
|
I am starting on a new project and see how powerful LINQ is. One thing I need to know before we begin is if there will be any problems using LINQ to run queries against a Sun (Oracle) Database server. Any input is welcome.
Thanks!
|
|
|
|
|
|
Hi fellas, this should be a pretty simple question.
Is it possible to restrict a datagrid or datalist in the number of records displayed? For example, I only want to show 1 record in a datagrid. (Since I have a bunch of records each time it ends up displaying everything retreived)
I tried using Paging feature and manage to display only 1 record at a time, however the "page changer buttons ( < > )" is displayed, can it be disabled?
Worse, Datalist doesn't seem to support paging, how exactly do I set the number of data to be displayed?
Many, many thanks for the help.
|
|
|
|
|
Gridview is the best control to use if you want a lot of fancy features for free. You can set the number of items per page in the datagrid. I would personally aim to write SQL that only asks for the record you will be looking at, then your data control only gets to see what you want to show.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi!
Im newbie here, so be comprehensive with me
I ll try to explain best i can, and forgive my bad english
Lets explain the problem...
I ve got an asp page with 3 DrowDownList, 2 buttons and 1 gridview. Its an simple web, not complicated, and apparently light.
My problem is that when i launch a click event of one button, it does vb code quick...but the web takes tooooo much long to refresh, and dont know why.
I ve got another webs on the same project, and don't takes so much time to refresh but this web takes too long.
I paste the code:
<br />
<br />
<asp:updatepanel id="upGridPedidos" updatemode="Conditional" runat="server"><br />
<contenttemplate><br />
<asp:gridview id="gdvPedidos" runat="server" style="z-index: 104; left: 21px; position: absolute;<br mode=" hold=" /"> top: 51px" AutoGenerateColumns="False" Width="167px"><br />
<alternatingrowstyle cssclass="tablaFila2"><br />
<rowstyle cssclass="tablaFila1"><br />
<headerstyle cssclass="tablaCabecera"><br />
<columns><br />
<asp:boundfield datafield="numero" headertext="Pedido"><br />
<asp:buttonfield commandname="eliminar" text="Eliminar"><br />
</asp:buttonfield></asp:boundfield></columns><br />
</headerstyle></rowstyle></alternatingrowstyle></asp:gridview><br />
</contenttemplate><br />
<triggers><br />
<asp:asyncpostbacktrigger controlid="btnInsertar" eventname="Click" /><br />
</triggers><br />
</asp:updatepanel><br />
The vb code of btnInsertar.Click is light and dont takes too much for the compiler to make that operations, but when it finish the vb code, it takes about 30 s. - 1 min to refresh a really light web, and its not normal.
If u need more code or more explanation, just ask it to me.
A lot of thx in advance.
modified on Tuesday, April 22, 2008 11:29 AM
|
|
|
|
|
The three things that can be slow are:
a - code execution
b - network traffic
c - database operations
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hey guys
I want to store assemblies in a folder other than default folder ie "BIN" for ASP.net 2.0.
Actualy I need to upload multiple projects on one hosting account and I have only one BIN directory on Root, and I don't want to mixed up DLLs for multiple projects.
Any suggestion in this regard will be very helpful in this regard.
|
|
|
|
|
Why not use the app_code folder? You can create subfolders in that. Just note you can't store user controls in it.
|
|
|
|
|
Hi
I have two problems
1) I want to display the titles of my List Items when I hover my mouse on the items. I am using asp:DropDown List, is it possible, I always my items to the list like this:
ListItem _item = new ListItem(_grp["Name"].ToString(), _grp["GroupID"].ToString());
_item.
ddlMyGroups.Items.Add(_item);
but I dont find any properties to add the titles of the items to the drop down list
2) I have links that collapse and hide the values in the div, when I hover my mouse over the link its always dispalying arrow icon instead of hand icon to select. Any one tell me to get the hand icon.
thanks,
Best Regards,
Aruna.G
|
|
|
|
|
gottimukkala wrote: I want to display the titles of my List Items when I hover my mouse on the items.
where do you want to dispaly it?
in your second question check this[^]
I Love T-SQL
|
|
|
|
|
I want to display the list in side the div.
|
|
|
|
|
Hello ALL,
I want to display data in gridview,iam retriving data from database,
for example in a column named accno iam having 123,124,125,126
i want to display all the accno's in gridview in a single row
Thanks In Advance.
Ali
|
|
|
|
|
make a select comand in SQL like this:
select col1+''+col2+''+col3 from nyTable
and bind it on GridView as single column
I Love T-SQL
|
|
|
|
|
Hello Freind,
Thanks a lot i got the output what i want.
Once again thanks for your help.
Thanks & regards.
Taha Ali
|
|
|
|
|
u are welcome...
I Love T-SQL
|
|
|
|
|
I am doing some testing of the difference of an application that calls a web service for all database I/O and an application that uses embeded, direct connect, SQL calls. After testing it appears that the application that does the direct connect to the database runs faster then the one that uses the web service for the data I/O. This being the case, why would I use a web service for data I/O and not just use embeded SQL? Note: I am testing a server application that runs on Windows Server 2003 and a database running on a Sun machine. As far as the web service, it and the server application are both running on the same Server 2003 machine.
Thanks!
|
|
|
|
|
Generally, the advantage of WebService is that you can plug in multiple clients - Web interface, WinForms client etc. to the web service, and those clients don't need to have any knowledge about the database itself. Also, it is more maintainable, if anything changes on the db level, you need to change only the webservice, not every client.
Another point is a security, if you are accessing the database from WinForms client, anyone can reverse engineer the client app and see connection string or username/password combination. When you keep this information on the web service, only privileged users (users with log-on access to the server) can have possible access to this information.
However, if your scenario is restricted to ASP.NET application -> WebService -> DB server structure, I don't really see the point having the WebService, especially if the WebServer and the WebService are running on the same machine.
I would say you should build data access layer within your web application then.
Pilo
|
|
|
|
|
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "test1", "function CreatePopUP(url,popArguments ,titleStr){if(popArguments == null || popArguments == "") {popArguments = "dialogWidth:30;dialogHeight:25;help:no;status:no;resizable:yes;";PopReturnedValue = false;};PopReturnedValue = showModalDialog("default2.aspx");", true);
what is the error in this code? it has syntax error. does anybody know
|
|
|
|
|
{popArguments = "dialogWidth:30;
The " closes the " started at "function CreatePopUP
Try change to ' instead.
- Reelix
|
|
|
|
|
replace your " with \" in the javascript string, or use ' instead
|
|
|
|
|
i use this code in my form:
cell8.Controls.Add(new LiteralControl("<A HREF=" + "javascript:window.open('a.htm')" + " <span style=" + "font-size:9pt;" + "></span>Print</A>"));
where should be my page a.htm my mean is what is the path format. what should i write in window.open(????), my page a.htm is in this path : C:\webpart\WritingWebPart\Reservation
|
|
|
|
|
You can't use physical path, unless you want to use your web application only for yourself on your local computer. (Other users probably don't have the file on the same physical path)
If you have the a.htm file in the same folder as the file that contains the code above, then use just window.open('a.htm')
if not, then you still can use relative path, for example window.open('SubFolder/a.htm') or window.open('../a.htm')
THIS IS PREFERED WAY!
or if you know what is going to be the url of the a.htm, then use it:
window.open('www.myserver.com/myApp/a.htm')
Note that url shouldn't be hardcoded, but should be determined in runtime (as zour application might be deplozed on more than one server, or the server name can be changed)
Pilo
|
|
|
|
|
hey any one please help in acessing acessing labletext which is in grid view cell.
|
|
|
|