|
i think you need to go to a dnn forum then
hope it gets sorted!
|
|
|
|
|
Found any answer? If so, Paste it here... I am facing the same problem.
|
|
|
|
|
Hi! I am writing this procedure:
CREATE PROCEDURE dbo.Table1_InsertText
{
@tblID int,
@tblName nvarchar(50)
@tblPlace nvarchar(50)
}
AS
SET NOCOUNT ON
INSERT INTO Table1
(tblName, tblPlace)
VALUES (@tblName, @tblPlace)
SET @tblID=scope_identity()
and when I want to save it, it says:
Incorrect syntax near '{'.
Must declare a scalar variable "@tblID".
Must declare a scalar variable "@tblName".
Any help?? Thx in advance
|
|
|
|
|
its a common mistake
use (
not {
|
|
|
|
|
thx , it works
|
|
|
|
|
you can also do that without using any bracket
|
|
|
|
|
Hi
i have created custom resource provider and getting the resources from xml file...appliction is not building ... i am getting compile time errors...'the resource object with key is not found'... Plz Provide me solution... here is my code
using System;
using System.Web.Compilation;
using System.Globalization;
using System.Resources;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Xml;
using System.Web;
using System.Web.Hosting;
using System.Web.Caching;
namespace Hydra.Providers
{
public sealed class XmlResourceProviderFactory : ResourceProviderFactory
{
public static ListDictionary resourceList = new ListDictionary();
public XmlResourceProviderFactory()
{
}
public override IResourceProvider CreateGlobalResourceProvider(string classKey)
{
return new XmlResourceProvider(null, classKey);
}
public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
{
//virtualPath = this.GetVirtualPath(virtualPath);
return new XmlResourceProvider(virtualPath, null);
}
public class XmlResourceProvider : IResourceProvider
{
private string _virtualPath;
private string _className;
private IDictionary _resource;
private static object CultureNeutralKey = new object();
public XmlResourceProvider(string virtualPath, string className)
{
_virtualPath = virtualPath;
_className = className;
}
//private IDictionary GetResource(string cultureName)
//{
// _resource = new ListDictionary();
// IDictionary resourceDict = _resource as IDictionary;
// resourceDict = XmlResourceHelper.GetResources(_virtualPath, _className, cultureName, true, null);
// _resource = resourceDict;
// return resourceDict;
//}
private IDictionary GetResource(string cultureName)
{
object cultureKey;
if (cultureName != null)
{
cultureKey = cultureName;
}
else
{
cultureKey = CultureNeutralKey;
}
if (_resource == null)
_resource = new ListDictionary();
IDictionary resourceDict = _resource[cultureKey] as IDictionary;
if (resourceDict == null)
{
resourceDict = XmlResourceHelper.GetResources(_virtualPath, _className, cultureName, true, null);
_resource = resourceDict;
}
return resourceDict;
}
object IResourceProvider.GetObject(string resourceKey, CultureInfo culture)
{
if (string.IsNullOrEmpty(resourceKey))
{
throw new ArgumentNullException("resourceKey");
}
if (culture == null || culture == CultureInfo.InvariantCulture)
culture = CultureInfo.CurrentUICulture;
object value = GetResource(culture.Name)[resourceKey];
return value;
}
public System.Resources.IResourceReader ResourceReader
{
get
{
return new XmlResourceReader(GetResource(null));
}
}
}
private sealed class XmlResourceReader : IResourceReader
{
private IDictionary _resources;
public XmlResourceReader(IDictionary resources)
{
_resources = resources;
}
IDictionaryEnumerator IResourceReader.GetEnumerator()
{
return _resources.GetEnumerator();
}
void IResourceReader.Close()
{
}
IEnumerator IEnumerable.GetEnumerator()
{
return _resources.GetEnumerator();
}
void IDisposable.Dispose()
{
}
}
internal static class XmlResourceHelper
{
public static IDictionary GetResources(string virtualPath, string className, string cultureName, bool designMode, IServiceProvider serviceProvider)
{
//ListDictionary resources = new ListDictionary();
string xmlFilePath;
string strCompanyId = "1";
//string strLayoutId = "1";
string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath);
string aspxPage = oInfo.Name;
string[] aspxPage1 = aspxPage.Split('.');
//HttpContext.Current.Handler
object obj = HttpContext.Current.Request;
//try
//{
// if (HttpContext.Current.Session["CompanyId"] != null)
// strCompanyId = HttpContext.Current.Session["CompanyId"].ToString();
// if (HttpContext.Current.Session["LayoutId"] != null)
// strLayoutId = HttpContext.Current.Session["LayoutId"].ToString();
//}
//catch {}
if (!String.IsNullOrEmpty(virtualPath))
{
// Get Local resources
XmlDocument configurationFile = new XmlDocument();
// xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + strLayoutId + "_en-US.xml");
xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + aspxPage1[0].ToLower() + "_en-US.xml");
//configurationFile.Load(xmlFilePath);
XmlReader reader;
XmlReaderSettings settings = new XmlReaderSettings();
settings.ProhibitDtd = false;
reader = XmlReader.Create(xmlFilePath, settings);
reader.Read();
configurationFile.Load(reader);
XmlNode node = configurationFile.DocumentElement;
parseResourcefile(node);
}
else if (!String.IsNullOrEmpty(className))
{
// Get Global resources
XmlDocument configurationFile = new XmlDocument();
// xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + className + "_en-US.xml");
xmlFilePath = HostingEnvironment.MapPath(HostingEnvironment.ApplicationVirtualPath + "/Languages/Local/" + strCompanyId + "/" + aspxPage1[0].ToLower() +"_en-US.xml");
configurationFile.Load(xmlFilePath);
XmlNode node = configurationFile.DocumentElement;
parseResourcefile(node);
}
return resourceList;
}
public static void parseResourcefile(XmlNode node)
{
foreach (XmlNode childNode in node.ChildNodes)
{
if (childNode.Name.StartsWith("resources"))
{
parseResourcefile(childNode);
}
else
{
if (childNode.Attributes["name"] != null && childNode.InnerText != string.Empty)
{
string rn = childNode.Attributes.Item(0).Value.ToString();
string rv = childNode.InnerText.ToString();
if (!resourceList.Contains(rn))
{
resourceList.Add(rn, rv);
}
}
}
}
}
}
}
}
|
|
|
|
|
hi,
I've installed my web application on a server that is windows 2000 but it really hangs. My application is asp.net ajax enabled and it works fine when I deploy it on windws xp.
What's missing in windows 2000? I've installed the ajax extensions and it already has framework 2.0 installed, and sql server 2000 and 2005 are installed on it. The home page is displayed and everything but when I try to login the page hangs and no error is displayed????
Can someone help me with this...do I have to find a server that has windows xp to deploy my application on or what?
|
|
|
|
|
see if this helps:
http://msdn2.microsoft.com/en-us/library/t6dbcb8d(VS.71).aspx
|
|
|
|
|
http://www.asp.net/ajax/documentation/live/InstallingASPNETAJAX.aspx[^]
I found this link and I found the supported operating systems are:
Windows Server 2003
Windows XP Home Edition
Windows XP Professional
Windows Vista
Any Windows operating system version (including Windows 2000) that supports the Microsoft .NET Framework version 2.0. Note that support will be limited to the terms of support for that platform.
(I cannot understand this one!!!) what does he mean by the "support will be limited to the terms of support for that platform???"
|
|
|
|
|
basically as it sounds, whatever support is allowed for that object then you will get that amount of support
|
|
|
|
|
Hi, i have a doubt..
I want to send an object to next page..directly....At there using this object, i want to use its memebers and methods. I need to send objects between aspx pages.
Please help me regarding this...
Thanking you
G. Satish
|
|
|
|
|
Use State Management concept
You can have session variable in which you can store whole object
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
If i put this in Sessions means processing will get down for the applciation if session contain more data.. Rather than sessions, any other alternative for this?
G. Satish
|
|
|
|
|
As you replied you have only 3 variables in the class object i think it is not going to hit the performance. you should not have any proeblem in using session.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Your best bet is, don't. What sort of object do you need to share between pages, and why ?
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Just i have a doubt...I didn't any requirement on this.
But my doubt is, suppose i created an object for one class that contains 3 memebers and 2 methods. Suppose, i want to use this object in another aspx page without inheriting the class. How to do this?
Another one, If Suppose i need to send one datatable object to next page,
then how to send this to other pages. If i put this in Sessions means processing will get down.. if session contain more data.. Rather than sessions, any other alternative for this?
G. Satish
|
|
|
|
|
Data objects are easy. Pass an id on the URL and rebuild your object from the database. For the rest, you would need to redesign your app to fit with a disconnected architecture, or use the session.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
use Session object or Query string
thankx
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
if i put this in Sessions means processing will get down,if session contain more data.. Rather than sessions, any other alternative for this?
G. Satish
|
|
|
|
|
Hi,
I don't think you can send the object of a class and use it in different class. However, you can create an object of the class in each page and use the properties and methods.
Regarding sending the datatable with data to another page, you can do so by creating an instance of DataTable both in th sending and receiving page.
Meeram395
|
|
|
|
|
As you rejected to use sessions
I think you may need to store the object info in a database, save it to the server and load it in the second page
Mohamed Gouda
Egypt
|
|
|
|
|
You can keep object in sessions. It won't slowdown the performance. Alternatively, check this[^] approach where objects are encoded in the URL, but you will end up in nasty URLs.
|
|
|
|
|
Hello,
I have one problem with creating new object of FONT it has no any option to give both bold and italic propertly at a time.
I am waiting for reply.
Best Regards,
Chetan Patel
|
|
|
|
|
Italic and font strength are two different CSS properties. You can also combine them.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|