|
anikhil wrote: master page menu control goes beneath my tab strip
Sounds like you need to brush up on your web design techniques.
You need to put the Page Content part of the master page in an area of the page that won't be used by the master page.
This article[^] explains how to use divs and style sheets to layout your page in a fairly standard manner. Just ensure that your page content is in the main content area, and the menu bar is in the header or sidebar areas.
Hope that helps.
|
|
|
|
|
I use the following code to export a page to excel. My problem is that i can't change the sheet name in excel file its always the physical name of the page not even its title!
Response.Clear();
Response.Buffer= true;
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";
Response.AddHeader("content-disposition", "inline;filename=MyExcelFile.xls");
marcoryos
|
|
|
|
|
hi
try this
Response.AddHeader("Content-Disposition", "attachment; filename=data1.txt");
regards
saravanan
|
|
|
|
|
I'm getting the error check1 not declared. It is used as a id for my checkbox. I tried delcaring it (don't understand why I should have to), but that didn't work. Any suggestions....code below:
1 <%@ Page Language="VB" %>
2
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <%@ Import Namespace="System.Data.OleDb" %>
5
6 <script runat="server">
7 sub Page_Load
8 Dim dbconn, sql, dbcomm, dbread
9 dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("Custodial.mdb"))
10 dbconn.Open()
11 sql = "SELECT * FROM Products"
12 dbcomm=New OleDbCommand(sql,dbconn)
13 dbread=dbcomm.ExecuteReader()
14 customers.DataSource=dbread
15 customers.DataBind()
16 dbread.Close()
17 dbconn.Close()
18 End Sub
19
20 Sub Check(ByVal sender As Object, ByVal e As EventArgs)
21
22 If check1.checked Then
23 mess.Text += "chk1.text"
24 End If
25
26
27 End Sub
28
29 </script>
30
31 <html>
32 <body>
33
34 <form id="Form1" runat="server">
35 <asp:Repeater id="customers" runat="server">
36
37 <HeaderTemplate>
38 <table border="1" width="100%">
39 <tr bgcolor="#b0c4de">
40 <th>Product Name</th>
41 <th>Select</th>
42 <th>Quantity</th>
43 </tr>
44 </HeaderTemplate>
45
46 <ItemTemplate>
47 <tr bgcolor="#f0f0f0">
48 <td><%#Container.DataItem("ProductName")%> </td>
49 <td><asp:CheckBox id="check1" runat="server" OnCheckedChanged="Check" AutoPostBack=true/></td>
50 <td><asp:TextBox id="Qty" maxlength=3 runat="server" />
51 </td>
52 </tr>
53 </ItemTemplate>
54
55 <FooterTemplate>
56 </table>
57 </FooterTemplate>
58
59 </asp:Repeater>
60
61 <asp:label id="mess" runat="server"/>
62
63 </form>
64
65 </body>
66 </html>
67
|
|
|
|
|
check1 doesn't exist in the context.
|
|
|
|
|
luvdairish wrote: </blockquote>
Don't do this, it's nasty. Put the code in a code behind file.
<blockquote class="FQ"><div class="FQA">luvdairish wrote:</div><ItemTemplate>
47 <tr bgcolor="#f0f0f0">48 <td><%#Container.DataItem("ProductName")%> </td>49 <td><asp:CheckBox id="check1" runat="server" OnCheckedChanged="Check" AutoPostBack=true/></td>50 <td><asp:TextBox id="Qty" maxlength=3 runat="server" />
51 </td>52 </tr>53 </ItemTemplate></blockquote>
If you create a control in an item template, it's going to be created once per row. As such, those checkboxes can't all have the same name, and so the framework has to generate names for them. You need to handle the check changed event per row, or iterate over all the rows looking for which rows have been changed.
<div class="ForumSig">Christian Graus - Microsoft MVP - C++
<a href='http://blog.metalmusings.com/'>Metal Musings</a> - Rex and my new metal blog</div>
|
|
|
|
|
Hi,
As the Check box in the Item Template it is not Declared in the Page Directive.
Not only This any thing that is Nested in the ItemTemplate will not be declared.
For this you Need to Go for an Iteration through the Items.
and in the Item you Find the CheckBox using FindControl and cast the type of it as checkbox.
-- Your Code
Sub Check(ByVal sender As Object, ByVal e As EventArgs)
21
--render through items in for loop
and in loop
and cast the control using type casting to some new checkBox with name NewCheckBox so now
22 If NewCheckBox.checked Then
23 mess.Text += NewCheckBox.Text
24 End If
25
26
27 End Sub
|
|
|
|
|
Does anyone have any idea how to separate GUI and business/data logic by placing the GUI on a Web Server and the business/data logic on an App Server?
The only thing I can think of is to place a web service on the App Server which makes it a web server now but on the inside of a firewall and then having it make the calls to the already written DLLs, is there a better way?
-- Update - I just found out about .NET Remoting but that would not work in this case because some pieces of the overall application are VB6.
Thanks!
Cleako
-- modified at 14:37 Thursday 4th January, 2007
|
|
|
|
|
I think you could still use .NET Remoting, if your VB6 code was compiled as COM objects. You could write a .NET wrapper object that uses P/Invoke to execute the COM code. Then you could use .NET Remoting to communicate among the pieces.
|
|
|
|
|
Well in this case there are multiple web sites that interact with each other, an intranet site and an internet site. The intranet site is ASP 1.0 VB6 and the internet site is ASP.NET 2.0 VB.NET. The code that resides on the application server will be invoked by either of the web sites so Im not sure that .NET Remoting is an option in this case without doing excessive work on the VB6 site or am I wrong in assuming that?.
Cleako
|
|
|
|
|
I do think .NET Remoting would be an option in your case. You'll want to look into COM Interop in addition to .NET Remoting; COM Interop allows your .NET code to be executed from a COM object (e.g. VB6). There's lots of articles on this - use Google to look for "COM Interop", "VB6 .NET Remoting", and the like.
|
|
|
|
|
Hi all.
I am wondering what you all think about this design issue. I have a page where a few things are static and one part, essentially another page, of it will be inserted when a choice is made in a combo box. The inserted portions contain static controls(text boxs, labels, drop down, etc...). I've seen this done on other websites but can't find any tutorials on how to do this. So I've thought of a couple of ways to go forward. One, I can create a user control for each inserted item, which there could be 10+ of, and register all of them on the page. Two, I can create classes which inherit from Panel for each item, programmatically add in each field into the panel at construction of the class. In either case, it could be pasted/created in when needed (on selection in the combo box).
I would prefer the user control route but I'm not sure about the impact on performance of registering 10+ controls on a page will have. The class route will be more tinkering.
I'd love to hear any kind of input on this. A link to a tutorial on how to do it would be good too.
-Keith
|
|
|
|
|
There isn't a major performance issue with User Controls. If I understand your question, you are talking about dynamically loading UCs.
|
|
|
|
|
Ahh yes...it's all about the vocab. *sigh* I'll do some more searching. In fact, I already found some good things...hopefully. Thanks.
|
|
|
|
|
Any good free ready made 2.0 compatible forums avaliable for a small (less than 10,000 members) site for SQL?
|
|
|
|
|
|
Anybody tried Jitbit AspNetForum?
|
|
|
|
|
Hi ,
I have to upload .csv file data to oracle 10g database from asp.net 2.0 page.
As .csv file data are too much large (around 200,000 records) so decided to
insert it using Sqlloader utility of oracle.
Now to execute sqlloader utility from asp.net web page
i have to use .Bat file(Batch file) and where .bat file will take oracle database
connection and in first parameter as .csv file.
Now i don't know how to take database connection to oracle from .bat file??
even i don't know is it possible or not ??
if it's not possible then what should be the alternative way to take database connection
with oracle from .bat file??
Is any article /sample code /link then will be good for me.
Thanks in advance.
Regards,
montu3377
|
|
|
|
|
You can invoke a VBS from within a BATCH file which can use ADO right?
|
|
|
|
|
Hello All,
I am working on ASPX 2.0 and C#.
I need to design a character report (text report).
Basically want users to save in txt file.
Any have any idea how to design text reports or text documents.
waiting for you reply.
Thankyou
|
|
|
|
|
What exactly will this report contain?
|
|
|
|
|
Hey guys, I'm trying to create a web-form (or website kind of thing) which returns xml when an url was called. I don't want to return html whatsoever, just as if an xml document url was called. How can I accomplish that?
|
|
|
|
|
Response.ContentType="text/xml"
From memory - not sure if MIME should be application/xml instead.
edit: oh yea, and Response.Write your xml then.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
|
|
|
|
|
Seems to be working even without the Response.ContentType , but I guess using the content type would be neater.
Thanks!
|
|
|
|
|
Using the correct content type would provide hints to the client app that XML is about to be received. Internet Explorer (and probably most web browsers) are smart enough to distinguish XML even without this hint.
|
|
|
|