|
|
I'm trying to use TabPanels inside of a TabContainer. Each of the TabPanels contains an iFrame with src specified. The problem I'm having...The panels will not adjust in size according to the content and content is not being displayed. If I don't use frames and simply place all markup/content within the <contenttemplate> tags, the panels' size adjusts to accomodate. Is there a trick to getting the TabPanels to work with iFrame?
<cc1:tabcontainer runat="server" id="Tabs" onclientactivetabchanged="ActiveTabChanged">
<cc1:tabpanel runat="Server" id="Panel1" headertext=" Page1 ">
<contenttemplate>
<cc1:tabpanel runat="Server" id="Panel2" headertext=" Page2 ">
<contenttemplate>
<cc1:tabpanel runat="Server" id="Panel3" headertext=" Page3 ">
<contenttemplate>
lawsop
|
|
|
|
|
hi,
i have sqlserver express set up on my machine and i am using the default AspNetSqlMembershipProvider provided by .Net 2.0. and my application uses forms authentication
I started out with a CreateUserWizard. when i run my application aspnetdb.mdf is created in App_data folder and my CreateUserWizard says that the user has been added.
But the problem is
1) when i try to open the database thru my database explorer (Visual studio 2005) it says "Failed to generate a user instance of SQL Server due to failure in the starting process for the user intance. The connection will be closed"
2) Also when i try using SqlServerManagement studio i can't see any database called aspnetdb when i connect to my SqlServerExpress. however i can see that aspnetdb.mdf is being created in my App_data folder.
my machine.config has this
<membership>
<providers>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
</providers>
</membership>
<connectionStrings>
<add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>
my web.config file has forms authentication
<authentication mode="Forms">
<forms name=".ASPXAUTH" loginUrl="Login.aspx" protection="All" timeout= "30" path="/" requireSSL="false" slidingExpiration="true" cookieless= "UseDeviceProfile" />
</authentication>
can somebody help me
thanks
yojimbo
|
|
|
|
|
If you want to open the database with SQL Management Studio Express you need to right click on the Database folder and click attach and browse to your DB in the App_data Dir in your current project then you will be able to see it in SQL MSE .
|
|
|
|
|
Hi,
I want to pass some values to the webservice writern in C# from my ASP page.
In the ASP page, I am using the Yahoo UI functions to make a webservice call like this
Append("oACDS = new YAHOO.widget.DS_XHR(\"AC1.aspx\", [\"Table\", \"Order\"]);\n");
....
Response.Write(Copy());
I am able to get the value keyed into the text box ... I am using this call in the webservice
string query = Request.QueryString["query"];
So similarly I want to pass more values from the asp page to webservice, can anybody pls let me know how can i do this?
Thanks in advance
|
|
|
|
|
You can use the Soap Toolkit to make a call to the web service from classic ASP, see the sample code from here[^] and more here[^]
|
|
|
|
|
I have a webcontrols image object on a web page.
I specify the imageurl of the picture that I want to display.
When I programmatically change the imageurl to another picture, how do I get the web page to show the new picture?
|
|
|
|
|
The image should change after postback.
|
|
|
|
|
I'm trying to add a masterpage to my functioning website. I was able to add the master page directive to 2 of the pages with out a problem. When I tried to add it to the 3rd page, the Page declaration was underlined to show an error and when I moused over it, I get the message BillOrder (name of the page) is ambiguous.
I haven't a clue as to why this is occuring. If anyone has run into this, I'd love an explanation. The only thing that I know to do is to recreate the page.
Thanks in advance.
|
|
|
|
|
Are you referencing that form in another page?
|
|
|
|
|
Yes, I'm linking to it from a button click.
|
|
|
|
|
Normally, this error happens when you have a naming conflict and you have to resolve that by either choosing another name or using the qualified name.
|
|
|
|
|
Hello,
I am trying to create a ItemTemplate at runtime for a ComponentArt
Grid.
This GridView works in a very similar way to the Asp.Net 2.0 GridView
so the implementation method should be the same.
When I don't use the ItemTemplate everything works fine.
However, when I use the ItemTemplate I get the following error:
"Exception Details: System.NullReferenceException: Object reference
not set to an instance of an object."
On the code line
lCollaborator.Text = tcCollaborator.DataItem("Name").ToString &
tcCollaborator.DataItem("City").ToString
I think my problem is really the binding method.
Could someone please tell me what might be wrong? I also tried using
the Asp.Net 2.0 GridView and I am getting the same problems.
I post my VB.NET code. Please, fell free to answer in VB.NET or C#.
GRID.aspx.vb
1 Partial Class Grid
2 Inherits System.Web.UI.Page
3
4 ' -- [Controls] -------------------------------------------
5
6 Protected WithEvents cagCollaborators As New
ComponentArt.Web.UI.Grid
7
8
9 ' -- [Events and Methods]
-------------------------------------------
10
11 ' Page_Init
12 Protected Sub Page_Init(ByVal sender As Object, ByVal e As
EventArgs) Handles Me.Init
13
14 phGrid.Controls.Add(cagCollaborators)
15
16 End Sub ' Page_Init
17
18 ' Page_Load
19 Protected Sub Page_Load(ByVal sender As Object, ByVal e As
EventArgs) Handles Me.Load
20
21 ' Create grid server template
22 Dim cagstCollaborators As ComponentArt.Web.UI.GridServerTemplate
= New ComponentArt.Web.UI.GridServerTemplate()
23
24 ' Create grid template
25 Dim gitCollaborators As GridITemplate = New GridITemplate
26 cagstCollaborators.Template = gitCollaborators
27 cagstCollaborators.ID = "cagstCollaborators"
28
29 ' Add grid server template to grid
30 cagCollaborators.ServerTemplates.Add(cagstCollaborators)
31
32 ' Create grid column
33 Dim gcCollaborators As ComponentArt.Web.UI.GridColumn = New
ComponentArt.Web.UI.GridColumn
34 gcCollaborators.DataCellServerTemplateId = "cagstCollaborators"
35
36 ' Create grid level
37 Dim glCollaborators As New ComponentArt.Web.UI.GridLevel
38 glCollaborators.Columns.Add(gcCollaborators)
39
40 ' Add grid level to grid
41 cagCollaborators.Levels.Add(glCollaborators)
42
43 ' Bind grid
44 cagCollaborators.DataBind()
45
46 End Sub ' Page_Load
47
48 ' {Grid} ...
49
50 ' cagCollaborators_Init
51 Private Sub cagCollaborators_Init(ByVal sender As Object, ByVal e
As EventArgs) Handles cagCollaborators.Init
52
53 ' Define cagCollaborators properties
54 With cagCollaborators
55 .ApplyStyleSheetSkin(Me.Page)
56 .AllowEditing = False
57 .ID = "cagCollaborators"
58 .RunningMode = GridRunningMode.Client
59 .ShowHeader = False
60 .Width = Unit.Percentage(100)
61 End With
62
63 End Sub ' cagCollaborators_Init
64
65 ' cagCollaborators_NeedRebind
66 Public Sub cagCollaborators_NeedRebind(ByVal sender As Object,
ByVal oArgs As System.EventArgs) Handles cagCollaborators.NeedRebind
67
68 ' Bind grid
69 cagCollaborators.DataBind()
70
71 End Sub ' cagCollaborators_NeedRebind
72
73 ' cagCollaborators_NeedDataSource
74 Public Sub cagCollaborators_NeedDataSource(ByVal sender As
Object, ByVal oArgs As System.EventArgs) Handles
cagCollaborators.NeedDataSource
75
76 ' Define collaborators grid datasource
77 cagCollaborators.DataSource = Collaborators()
78
79 ' Bind collaborators grid
80 cagCollaborators.DataBind()
81
82 End Sub ' cagCollaborators_NeedDataSource
83
84 ' cagCollaborators_PageIndexChanged
85 Public Sub cagCollaborators_PageIndexChanged(ByVal sender As
Object, ByVal oArgs As
ComponentArt.Web.UI.GridPageIndexChangedEventArgs) Handles
cagCollaborators.PageIndexChanged
86
87 ' Define current page index
88 cagCollaborators.CurrentPageIndex = oArgs.NewIndex
89
90 End Sub ' cagCollaborators_PageIndexChanged
91
92 ' Collaborators
93 Public Shared Function Collaborators() As DataTable
94
95 ' Create collaborators data table
96 Dim dtCollaborators As New DataTable
97
98 ' Add columns to collaborators data table
99 With dtCollaborators.Columns
100 .Add(New DataColumn("Name", GetType(String)))
101 .Add(New DataColumn("Mobile", GetType(String)))
102 .Add(New DataColumn("Email", GetType(String)))
103 .Add(New DataColumn("City", GetType(String)))
104 End With
105
106 ' Create and add a new collaborator row
107 Dim drRow01 As DataRow
108 drRow01 = dtCollaborators.NewRow
109
110 ' Define collaborator row values
111 drRow01("Name") = "John"
112 drRow01("Mobile") = "983498223"
113 drRow01("Email") = "j...@mydomain.com"
114 drRow01("City") = "New York"
115
116 ' Add row to collaborators data table
117 dtCollaborators.Rows.Add(drRow01)
118
119 ' Create and add a new collaborator row
120 Dim drRow02 As DataRow
121 drRow02 = dtCollaborators.NewRow
122
123 ' Define collaborator row values
124 drRow02("Name") = "Andrew"
125 drRow02("Mobile") = "983498223"
126 drRow02("Email") = "and...@mydomain.com"
127 drRow02("City") = "Paris"
128
129 ' Add row to collaborators data table
130 dtCollaborators.Rows.Add(drRow02)
131
132 ' Return collaborators data table
133 Return dtCollaborators
134
135 End Function ' Collaborators
136
137
138 ' -- [Sub Classes] -------------------------------------------
139
140 Public Class GridITemplate
141 Implements System.Web.UI.ITemplate
142
143
144 ' -- [Controls] -------------------------------------------
145
146 ' ---- {ASP.NET} ----
147
148 ' {Label} ...
149 Protected WithEvents lCollaborator As New Label
150
151 ' -- [Events and Methods]
-------------------------------------------
152
153 ' {Label} ...
154
155 ' lCollaborator_Init
156 Private Sub lCollaborator_Init(ByVal sender As Object, ByVal e As
System.EventArgs) Handles lCollaborator.Init
157
158 ' Define lCollaborator properties
159 With lCollaborator
160 .CssClass = Me.CssClass
161 .ID = "lCollaborator"
162 End With
163
164 End Sub ' lCollaborator_Init
165
166
167 ' ---- {ASP.NET Item Template} ----
168
169 ' InstantiateIn
170 Public Sub InstantiateIn(ByVal container As Control) Implements
ITemplate.InstantiateIn
171
172 ' Define template container
173 Dim tcCollaborator As
ComponentArt.Web.UI.GridServerTemplateContainer
174 tcCollaborator = CType(container,
ComponentArt.Web.UI.GridServerTemplateContainer)
175
176 ' Define lCollaborator text
177 lCollaborator.Text = tcCollaborator.DataItem("Name").ToString &
tcCollaborator.DataItem("City").ToString
178
179 ' Add item template child controls
180 container.Controls.Add(lCollaborator)
181
182 End Sub ' InstantiateIn
183
184 End Class ' GridITemplate
185
186 End Class
187
188
189
Thank You Very Much,
Miguel
|
|
|
|
|
IMO, it should be easier if you tell which line is causing the NullReferenceException, and I guess that you can debug to see which object that you use is null.
|
|
|
|
|
Hi,
sure. I just debugged and I get an error in the following line:
lCollaborator.Text = "Name: " & tcCollaborator.DataItem("Name").ToString
I though it was because of tcCollaborator.DataItem("Name").ToString
But now I replaced this line by the following and I don't get any error:
Dim a As String = tcCollaborator.DataItem("Name")
Of course I don't see anything in my grid.
Now I am confused.
Any idea?
Thanks,
Miguel
|
|
|
|
|
Okay, now it's much clearer and I guess I know the reason . Here, it's clear that the tcCollaborator.DataItem("Name") object is null, and that throws the exception when you use the ToString method of the null object. The reason this object is null is that you are trying to get the data object bound to the container using the DataItem property, and basically it only has value after data is bound to the control, but here you put your code in the InstantiateIn method which occurs before the data binding happens. So you can use the DataBinding event of the lCollaborator object and put your code to query the data item and set the Text property in the event handler
|
|
|
|
|
Hi,
I read carefully what you wrote and I got the same error after making a few changes to my code.
This is what I did:
' InstantiateIn
Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
' Define template container
Dim tcCollaborator As ComponentArt.Web.UI.GridServerTemplateContainer = CType(container, ComponentArt.Web.UI.GridServerTemplateContainer)
' Add lCollaborator data binding handler
AddHandler lCollaborator.DataBinding, AddressOf lCollaborator_DataBinding
' Add item template child controls
container.Controls.Add(lCollaborator)
End Sub ' InstantiateIn
' lCollaborator_DataBinding
Private Sub lCollaborator_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs)
' Create and define lCollaborator
Dim lCollaborator As Label = CType(sender, Label)
' Create and define lNews container
Dim container As ComponentArt.Web.UI.GridServerTemplateContainer = CType(lCollaborator.NamingContainer, ComponentArt.Web.UI.GridServerTemplateContainer)
' Define lCollaborator text
lCollaborator.Text = "Name: " & container.DataItem("Name").ToString
End Sub ' lCollaborator_DataBinding
Any idea? I am completely out of ideas ...
Thanks,
Miguel
|
|
|
|
|
Now, you might want to debug to see what the container.DataItem("Name") contains. Does it really have any column/property named "Name"?
|
|
|
|
|
Hi,
To be honest I am not able to debug and see what is inside container.DataItem("Name").
However, in the code I posted I have the function which creates the DataTable:
Public Shared Function Collaborators() As DataTable
' Create collaborators data table
Dim dtCollaborators As New DataTable
' Add columns to collaborators data table
With dtCollaborators.Columns
.Add(New DataColumn("Name", GetType(String)))
.Add(New DataColumn("Mobile", GetType(String)))
.Add(New DataColumn("Email", GetType(String)))
.Add(New DataColumn("City", GetType(String)))
End With
' Create and add a new collaborator row
Dim drRow01 As DataRow
drRow01 = dtCollaborators.NewRow
' Define collaborator row values
drRow01("Name") = "John"
drRow01("Mobile") = "983498223"
drRow01("Email") = "john@mydomain.com"
drRow01("City") = "New York"
' Add row to collaborators data table
dtCollaborators.Rows.Add(drRow01)
' Create and add a new collaborator row
Dim drRow02 As DataRow
drRow02 = dtCollaborators.NewRow
' Define collaborator row values
drRow02("Name") = "Andrew"
drRow02("Mobile") = "983498223"
drRow02("Email") = "andrew@mydomain.com"
drRow02("City") = "Paris"
' Add row to collaborators data table
dtCollaborators.Rows.Add(drRow02)
' Return collaborators data table
Return dtCollaborators
End Function ' Collaborators
It seems ok, right?
What should I do? How can I see what is inside container.DataItem("Name") as you mentioned?
Thank You,
Miguel
|
|
|
|
|
Just curious why you cannot debug the code? Anyway, you need to write some information to the web page ( simply using the Response object) or a log file to investigate which type of the container.DataItem object. Is it the DataRowView? Can you then also try to cast something like CType(container.DataItem, DataRowView)("Name").ToString()?
|
|
|
|
|
hi friends
i have a big query on my online examination project using asp.net
i want use case,activity,ER, data flow ,all the UML diagram for my project.if anyone have thn plz send me on my e mail address and if someone made already thios project thn also send me on my e mail address
my e mail add is hardik_patel75@yahoo.co.in
plz i needed it its urgent for me
hardik_75
|
|
|
|
|
What do you mean by 'use' ? You can show bitmaps in your form, whatever they are.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I think you should re-evaluate your learning methods....
|
|
|
|
|
Hi friends
i have 36 textboxs,i want to entered the data in all textboxes click the
submitt button data stored in database.how i get 36 textbox value in array.
thanks in advance
regards
saravanan
|
|
|
|
|
Why even bother with an array? It's just an extra step to the database.
|
|
|
|