|
|
Hello All,
I am doing Localization in my application, and using following script for Post Date Alert for making sure user does not select date earliar than today..
Problem is if I login as Chinese culture or other except English, I choose date from calander which is greater than today, it gives popup and then display Todays date in English.
I am using EnableScriptGlobalization= "true" in ToolkitScriptManager so as calander will display in respective culture.
function checkDate(sender, args) {
if (sender._selectedDate > new Date()) {
alert("Alert");
sender._selectedDate = new Date();
sender._textbox.set_Value(sender._selectedDate.format(sender._format));
}
}
Thanks.
Shreshtha
|
|
|
|
|
Afer I moved my code to new machine am getting this error "System.Security.Policy.PolicyException: Required permissions cannot be acquired."
|
|
|
|
|
Do any of these[^] apply to you?
|
|
|
|
|
thanks for your reply.
still am facing the same issue.
|
|
|
|
|
what have you tried? When do you get the error? how does it exhibits?
|
|
|
|
|
<trust level="Full" originUrl="" />
is already available in my application and am getting this error only on some of the pages in my application.
Error Message:
[PolicyException: Required permissions cannot be acquired.]
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +7606807
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57
[FileLoadException: Could not load file or assembly 'WebChart, Version=1.1.1.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +43
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +127
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +142
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'WebChart, Version=1.1.1.4, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +613
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +203
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +105
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory vdir) +163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory vdir, Boolean ignoreErrors) +53
System.Web.Compilation.BuildManager.BatchCompileWebDirectory(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors) +175
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +86
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +261
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +101
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +126
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +62
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +33
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +307
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
modified on Monday, July 26, 2010 11:28 AM
|
|
|
|
|
I am using asp.net with c# and sql server. well I have some syntax error problem. my code is:
<asp:Repeater runat="server" id="Repeater1">
<HeaderTemplate>Items<br /><br /></HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "CatName") %></t>
<asp:HiddenField ID="HiddenField1" runat="server" value='<%# DataBinder.Eval(Container.DataItem,"ID") %>' />
<asp:Repeater id="Repeater2" runat="server" DataSourceID="AccessDataSourceMembers">
<ItemTemplate>
<tr>
<br><%# DataBinder.Eval(Container.DataItem, "ItemName") %></br>
</tr>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="AccessDataSourceMembers" runat="server" ConnectionString="server=myComp;uid=sa;pwd=sa;database=catItem" SelectCommand="SELECT * FROM items Where cat_ID = ?">
<SelectParameters>
<asp:ControlParameter Name="ID" ControlID="HiddenField1" PropertyName="Value" Type="string" />
</SelectParameters>
</asp:SqlDataSource>
</ItemTemplate>
<separatortemplate>
<br />
<br />
<br />
</separatortemplate>
</asp:Repeater>
and the error it is showing is:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near '?'.
Source Error:
Line 1197: objDA.Fill(ds);
Line 1198: Repeater1.DataSource = ds;
Line 1199: Repeater1.DataBind();
Line 1200:
Line 1201:
Note:If I do not use the nested repeater, it is working fine. So Can anyone tell me why is that error and how to get out of it??
suchita
|
|
|
|
|
SayamiSuchi wrote: SELECT * FROM items Where cat_ID = ?
it is complaining about your query. Are you sure that is what you want.
|
|
|
|
|
isn't the query was right ? I am new to repeater template tool and i am trying to use nested repeater. it gave those errors.
suchita
|
|
|
|
|
SELECT * FROM items Where cat_ID = ?
Is an Oracle format query not TSQL.
How you go about fixing this depends on what database your using. If it's SQL Server, then you'll need to amend the query to use the proper format (named parameters). If it's oracel then you'll need to swap out the datasource for the Oracle equivelent
|
|
|
|
|
Maybe this is not the easiest solution, but it works for me...
<asp:Repeater runat="server" ID="Repeater1" DataSourceID="dsLocations">
<HeaderTemplate>
Items<br />
</HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "City") %></b> <b><%# DataBinder.Eval(Container.DataItem, "State") %></b>
<asp:HiddenField ID="HiddenField1" runat="server" Value='<%# DataBinder.Eval(Container.DataItem,"LocationID") %>' />
<asp:Repeater ID="Repeater2" runat="server" DataSourceID="dsUserData">
<ItemTemplate>
<p>
<%# DataBinder.Eval(Container.DataItem, "LastName") %>,
<%# DataBinder.Eval(Container.DataItem, "FirstName") %></br>
</p>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="dsUserData" runat="server"
ConnectionString="server=.\SQLEXPRESS;Initial Catalog=LinqTest;Integrated Security=true"
SelectCommand="SELECT * FROM UserData Where LocationID = @LocationID"
OnSelecting="dsUserData_Selecting">
<SelectParameters>
<asp:Parameter Name="LocationID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</ItemTemplate>
<SeparatorTemplate>
<br />
<br />
<br />
</SeparatorTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="dsLocations" runat="server" ConnectionString="server=.\SQLEXPRESS;Initial Catalog=LinqTest;Integrated Security=true" SelectCommand="SELECT * FROM Location"></asp:SqlDataSource>
Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void dsUserData_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
HiddenField hf = Repeater1.Controls[1].FindControl("HiddenField1") as HiddenField;
if (hf == null)
return;
e.Command.Parameters[0].Value = hf.Value;
}
}
Not sure if it works for oracle. Tested with mssql 2005.
|
|
|
|
|
But in user control page,can we use hiddenfield ? Mine is not taking that ...I tried this one too..
suchita
|
|
|
|
|
u hav to write in line no 1197---->>> objda.fill(ds,"tablename");
i gave suggestin on my best knowldge.........
tried once.............
|
|
|
|
|
Hi all,
I have one basic question pop up control has one method whether it work if we host application in IIs
thanks,
amit
|
|
|
|
|
of course it will work if you have the ajax toolkit installed. Are you experiencing any particular issue with it?
|
|
|
|
|
no i am getting any issue with it
i have one requirement........see
i have one text box which is attached to autocomplete extender so suppose user enters any thing then i m checking into the database whether it contains this thing or if not then pop up will come do u want add with ok cancel if he click on ok then add thense details to database .
will ModalPopupExtender work in this scenario.
thanks,
amit
|
|
|
|
|
Ofcourse. Yes.
There is no foolish question, there is no final answer...
|
|
|
|
|
Hi
Is it possible to add check box inside drop down and select multiple check box and read these value.
thanks,
amit
|
|
|
|
|
Not out of the box. The closest you will get is the ChecklistBox. There are third party controls that do provide this functionality though.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Hi All,
I am using auto complete extender if user enters anything in text box and no record found so is it possible to enable one link so that user can add this data into database
Thanks,
Amit
|
|
|
|
|
hi guys,
I am using .net 3.5 framework and i am using repeater control in my application.I am using link button to display the records.Displaying 9 records in a page.Show all button is there.When i click on show all button(Result of 250 records) then the page is loading and hanging for some time anf then it is displaying the all records.I know the time taken between the server and the browser.But i need to avoid the hanging of the page and the loading time should be reduced.How to solve this issue.If the page contains 9 products then it is loaded quickly.But if it contains lot of images then it's hanged.
some of my friends told to use the jquery but i have noo idea regarding jquery so can anyone give an solution for this.Till it's breaking my head.
regards,
krish
|
|
|
|
|
What fields are being displayed in the repeater? If you are trying to display too much, or there is nesting involved then of course the rendering will be slower.
JQuery, or any Ajax technique, will not reduce the load time, it can help mask it by making an out of band call rather than a postback. However, you would responsible to load the data into the page controls.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|