|
On a page I have and dymanicly generated ajax controls.
On Page_init
I created all dymanic controls however on asp:Button click event I can't find any of those dynamycly generated controls (FindControls not working). Could you tell me why?
myLiteralControl = New LiteralControl(" What type of student are you? ")
pnlQuestionnaire.Controls.Add(myLiteralControl)
Dim ddlDemographicTypes As New DropDownList
ddlDemographicTypes.ID = "ddlDemographicTypes"
pnlQuestionnaire.Controls.Add(ddlDemographicTypes)
Dim rfvDemographicTypes As New RequiredFieldValidator
rfvDemographicTypes.ID = "rfvDemographicTypes"
rfvDemographicTypes.Text = "* Required field"
rfvDemographicTypes.ControlToValidate = "ddlDemographicTypes"
pnlQuestionnaire.Controls.Add(rfvDemographicTypes)
Dim DemographicTypesCascadingDropDown As New CascadingDropDown
With DemographicTypesCascadingDropDown
.ID = "DemographicTypesCascadingDropDown"
.TargetControlID = "ddlDemographicTypes"
.Category = "DemographicTypes"
.PromptText = "< Please select>"
.ServicePath = "Service.asmx"
.UseContextKey = True
.ServiceMethod = "GetDemographicTypes"
.ContextKey = strGroupID
End With
pnlQuestionnaire.Controls.Add(DemographicTypesCascadingDropDown)
myLiteralControl = New LiteralControl("" & " ")
pnlQuestionnaire.Controls.Add(myLiteralControl)
End If
|
|
|
|
|
Dear All,
Please go through with my code. I do not understand why this is not working.I have searched alot and make this code.When i am checking my asms file in browser data is reflecting correctly in XML but when i am running in ASPX page nothing is happening.There is no error also
************.aspx page
my code here
webservice
[WebMethod]
public List<string> getAdmissionNo(string prefixText)
{
SqlConnection sqlConnection = new SqlConnection(ConfigurationManager.AppSettings["MyCon"].ToString());
sqlConnection.Open();
SqlCommand sqlCommand = new SqlCommand("select Convert(varchar,AdmissionNo) As AdmissionNo from OA_ADM_tblAdmission_AdmissionDetails where AdmissionNo like @Name+'%'", sqlConnection);
sqlCommand.Parameters.AddWithValue("@Name", prefixText);
SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCommand);
DataTable dt = new DataTable();
sqlDataAdapter.Fill(dt);
List<string> AdmissionNos=new List<string>();
for (int i = 0; i < dt.Rows.Count; i++)
{
string s =Convert.ToString(dt.Rows[i]["AdmissionNo"].ToString());
AdmissionNos.Add(s);
}
return AdmissionNos;
}
And aspx
<asp:ScriptManager runat="server" ID="sm"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txtAdmisssionNo" runat="server" MaxLength="15"></asp:TextBox>
<asp:AutoCompleteExtender ID="autoCompleteExtender" runat="server" TargetControlID="txtAdmisssionNo"
MinimumPrefixLength="1" ServiceMethod="getAdmissionNo" ServicePath="~/Service.asmx" >
</asp:AutoCompleteExtender>
</ContentTemplate>
</asp:UpdatePanel>
correct records
121010001/002
121020001/003
121020002/002
121010002/001
111020002/001
111020001/003
111010001/001
but our Autocomplete result displays this format
60505000.5
40340000.333333336
60510001
121010002
111020002
37006667
111010001
it was wrong.i want 121010001/002 this format records help me.
|
|
|
|
|
its nothing
just
AdmissionNos.Add("\"" + dr["AdmissionNo"].ToString() + "\""); .
problem solved
|
|
|
|
|
can i call method (not from code behind) to set attribute of server control?
in fact i need DataBind - like markup without DataBinding
just like
<asp:Repeater runat="server" ID="rpt" DataSourceID="dsID">
<ItemTemplate>
<%#Eval("something")%>
</ItemTemplate>
</asp:Repeater>
i need something like this
public string Hello()
{
return "hello";
}
<asp:Label ID="Label1" runat="server" Text='<%#Hello() %>' />
|
|
|
|
|
hi all,
Please, help me good and professional CSS for GRIDVIEW in ASP.NET.
Thanks in advance.
Regards,
ssnsol
|
|
|
|
|
Hi all,
Wish you a happy and prosperous new year 2012.
I am saravan kumar.
I am developing ASP.NET application on inventory and production managment system using ASP.NET, MS-SQL SERVER 2008 and Framework 3.5.
I had created virtual directory in IIS 6.0 to ASP.NET application in server system.
Problem number 1:
I am not able to access virtual directory using "http://localhost/virtual directory/" in server system itself. But, login page does not establish connection with MS-SQL SERVER 2008.
Problem number 2:
I am not able to access virtual directory in LAN from other nodes. (only one LAN with 5 nodes).
Please, help me at the earliest.
Thanks in advance.
Regards,
Saravan Kumar.S
|
|
|
|
|
hi,
i have concatenate following strings 1123456,/,009 using
list<string> .but it was displayed in
124828 that is divide the value in 009 i want 1123456/009 this format for using autocomplete textbox using webservice asmx.pls help me
modified 20-Jan-12 3:44am.
|
|
|
|
|
hi,
You can concatenate both.
Eg. List<string> samplevalues = new List<string>;
samplevalues.Add(0,"0000233");
samplevalues.Add(1,"009");
string result = string.Empty;
result = samplevalues[0].ToString() + "/" + samplevalues[1].ToString();
Regards,
ssnsol.
|
|
|
|
|
Test.aspx is contained to master page.
ans Test.aspx page create sub menu by using jquery.
I want to maintain scroll when i click submenu which url is also Test.aspx.
So if i click click submenu , page move to Test.aspx.
Amd I want to maintain scroll.
So I insert below code to masterpage and Test.aspx page.
maintainScrollPositionOnPostBack="true"
But it does't work...
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
hi,
In asp.net3.5 autocomplete textbox using webservices display problem. that is the autocomplete actual records are 121010001/002,121020001/003. but its display in 60505000.5,40340000.333333336 this format. pls correct that help me.
Shanthi
|
|
|
|
|
i think it is displaying division ,You can convert this vales into varchar in the sql script
|
|
|
|
|
hi,
its correct. but converted into varchar again display the double values.
|
|
|
|
|
Hi,
Try this.
While selecting records from backend. Use
convert(varchar,field1)
Regards,
ssnsol.
|
|
|
|
|
Is there any good blog software that I can use on my asp.net website?
|
|
|
|
|
|
|
Hi All,
I just want to get your opinion on what is the best approach in my gridview.
Sample Gridview Data.
--------------------------------------------------------------------
| | UserID | First Name | Last Name | Last Loggedin|
--------------------------------------------------------------------
|imgBtn | PHUserId1 | Jim | Carey | 1/16/2011 6:00AM |
--------------------------------------------------------------------
--------------------------------------------------------------------
|imgBtn | PHUserId2 | Andres | Boni | 1/27/2011 5:56 PM |
--------------------------------------------------------------------
--------------------------------------------------------------------
|imgBtn | PHUserId3 | George | Jungle | 1/2/2011 4:01 AM |
--------------------------------------------------------------------
What i want to do is, in the 1st column of the GridView(grdUserList) control once i click the ImageButton control inside ItemTemplate of the gridview a popup(Ajax PopupExtender)
will appear. The popup contains GridView (grdHistory) control inside of it which are the logged history of the user you select.
Actually, the design and the output is already done. I get a popup everytime i click the ImageButton on the 1st column of the GridView(grdUserList) control.
But the problem now is, how do i refresh the GridView(grdHistory) control in my popup everytime i select different user in my GridView(grdUserlist).
I place Click event on the ImageButton but it fires only once. The next click on the ImageButton will no longer fires the Click event.
I dont what to used the Ajax ModalPopupExtender for the reason of, i dont what the user to close a popup evertime they click the ImageButton in the 1st row.
Thanks in advance
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
did you handle the Commit event?
Help people,so poeple can help you.
|
|
|
|
|
Hi,
Thanks for the reply. Can you provide a little code on that? Because i don't know how
Commit will affect the refreshing of GridView control. If I'm not mistaken
Commit have one parameter that accept string type.
Thanks for providing a little code.
Thanks
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
OK,Sir;
Send me your code.
Help people,so poeple can help you.
|
|
|
|
|
Hi Ali,
I already sent the code.
Thanks for the help.
Cheers!
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
I am about 40% done with a very early iteration of an MVC3 application geared toward online training and testing. I have simply used the default layout view and views generated by the default T4 templates, as me and the client both agree wholeheartedly that I should only be focusing on function and not form at this phase of development. However, I know for a fact that to demonstrate an application in this early phase, where functionality is clunky and limited, a nice UI goes a long way to colouring the clients perception in a positive way.
Are there any collections of, or even single instances of, ready-made layouts/themes for MVC3 applications that I can obtain, say, two or three of, and replace the very clunky default theme for my app, without too much layout and styling detail? I have those written up to a fairly large number of hours in a later sprint.
|
|
|
|
|
[SOLVED]
I was impersonating a user in the web.config .
[/SOLVED]
I receive the following error when going to an asp.net website.
Could not load file or assembly 'EA.DataAccess' or one of its dependencies. Access is denied.
Frankly I'm lost here. We had the problem before when the server was just installed. We added the correct assemblies to the GAC, changed machine.config, etc... until it worked.
Fo info: It's a dll using Odp.Net.
Here's the situation:
1. we have a dev and a test environment (and a production, but I'm not there yet) all servers are x64.
2. The application is running in an application pool that runs other applications using the SAME dll as well. Only this application is failing, the others work without problems. The dll version is the same.
3. The application is running without problems on the dev environment as well.
4. I tried to clean the C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files for that folder.
5. I checked the machine.config file.
6. I compared the dev and test environment on user rights and configuration.
7. I switched on the enablelog registry key: (if someone understand this better than I do)
=== Pre-bind state information ===
LOG: User = Unknown
LOG: DisplayName = EA.DataAccess
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: EA.DataAccess | Domain ID: 7
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http:
LOG: Appbase = file:LOG: Initial PrivatePath = C:\inetpub\wwwroot\EA.Travel.MailFax\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\inetpub\wwwroot\EA.Travel.MailFax\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:LOG: Attempting download of new URL file:LOG: Attempting download of new URL file:LOG: Using application configuration file: C:\inetpub\wwwroot\EA.Travel.MailFax\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
ERR: Failed to complete setup of assembly (hr = 0x80070005). Probing terminated.
Hope someone can help me.
Thanks in advance.
V.
modified 18-Jan-12 9:54am.
|
|
|
|
|
Hi guys,
Any 1 got ideas about how to synchronize Ms Access and SQL Server (Express Edition) database. the scenario is I Create a database and a table containing a single text column for both MsAccess as well as SQL Express (DB and table name to be similar). By performing insert / update / delete on SQL Express (Source) and I must ensure that the data is updated accordingly on the database in Ms Access (Destination) as well. Vise versa.
So did I need to create 2 connectionstrings , which 1 is OLEDB and another is SQL? As i know we can use same sql statement,just need to be cautious with reserve word for database command such as OLEDBCONNECTION and SQLCONNECTION.
|
|
|
|
|
Ok..I successfully synchronize access and sql server. Follow this step:
1.OPen your access database.
2. Go to file>get external data>link tables
3. At Files Of Type, 'choose ODBC Databases()'
4. Click new and choose 'SQL Server'. Click advanced and enter this 'DRIVER={SQL Server} DATABASE=yoursqldatabasename'. then click ok and next.
5. Enter your own datasource name ok then finish.
6. Then create datasource window will popup. choose server that locate your sql server database.Click Next
7. You can choose windows authentication or insert sql server authentication login id
8. Change default database to targeted database. Next and finish.
9. OK until popup link tables window. Choose which table you want to synchronize.
10. try update,insert and delete. Make sure both table in access and sql server update accordingly.
|
|
|
|