|
kandalu wrote: Why it is necessary to use webservice in Autocomplete TextBox?
I dont think so it is necessary.
kandalu wrote: Is there any way to use Autocomplete TextBox without webservice?
Purpose of Web Services is diiferent. we can use it as a layer and use in multiple application . Go thorugh Google to learn use of webservices.
kandalu wrote: Is there any way to use Autocomplete TextBox without webservice?
Use Simply AJAX
kandalu wrote: Please refer me some useful sites to learn about webservice.
W3School, CodeProject.com
cheers,
Abhijit
|
|
|
|
|
Hi,
Thanks for your reply. First I will try without webservice and then I will try with webservice. Thanks for the hint given for webservice.
Thanks.
|
|
|
|
|
Webservice is not needed. If you haven't specified the webservice path, AutocompleteTextBox will pick the method from page. See what documentation says
ServicePath - The path to the web service that the extender will pull the word\sentence completions from. If this is not provided, the service method should be a page method.
|
|
|
|
|
Hi,
If I use a Function in .cs file that function is not called. If I use the same method using webservice it works well. The code is given below :
<ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" MinimumPrefixLength="1"
ServiceMethod="GetRegC" TargetControlID="TextBox1">
The "GetRegC" is coded as a function in the default.cs file.
I don't know how to specify that function. So, I am using webservice.
Thanks.
|
|
|
|
|
HI,
I want to store the Image files in sql table and after inserting, I want to read and display the same in gridview.....
For storing ImagePath what is the datatype used and for Imagedata what is the datatype.......please help me..
Best Regards
Mcmilan
|
|
|
|
|
|
mcmilan wrote: For storing ImagePath what is the datatype used
Varchar
mcmilan wrote: for Imagedata what is the datatype.
VARBINARY(MAX)
|
|
|
|
|
I'm trying to set up an object data source which will be used to populate a text box for instance. The problem that I'm running into is that the object's method that does the actual query takes a parameter (ID). So I need to set
<pre>
&lt;asp:ObjectDataSource ID="odsCities" runat="server" SelectMethod="CitiesList" TypeName="WEBSWAPP_BLL.Demos"&gt;
&lt;SelectParameters&gt;
&lt;asp:ControlParameter ControlID="?????" Name="ProvinceID" PropertyName="AssemblyID"
Type="Int32" /&gt;
&lt;/SelectParameters&gt;
&lt;/asp:ObjectDataSource&gt;
</pre>
Now the problem is that the value that needs to be passed to the object is the assembly id but it's been retrieved from a drop down list which is located on the page itself. Now this new datasource that I'm setting is on a separate user conrol (.ascx file). So I can't use the drop down list from the page itself...whats the best way to accomplish that?
Thanks
|
|
|
|
|
make a public property in the user control and pass the parameter to that user control.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Hello,
anyone out there who can help ?
Page1
MenuControl with different Hyperlinks to Page2
Page2
Multiview - which should now change from default-view to hyperlink-related views.
Normally it should work with a script on page_load of Page2 and a session variable. But I really don't get the script working fine.
Thanks in advance
Lothar
|
|
|
|
|
Hi
We've developed open-source ASP.NET shopping cart. nopCommerce is a open source e-commerce solution that is ASP.NET 3.5 based with a MS SQL 2005 (or higher) backend database. nopCommerce is available for free. If somebody will be interested in reviewing it please visit http://www.nopCommerce.com
Thank you!
nopCommerce is the open-source eCommerce solution. nopCommerce is available for free.
http://www.nopCommerce.com
|
|
|
|
|
I have had a quick overview of it. And i must say i am impressed by the way you have handled the project. Will look in detail some other time.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
Ahsan
Thank you
nopCommerce is the open-source eCommerce solution. nopCommerce is available for free.
http://www.nopCommerce.com
|
|
|
|
|
Sorry for my ignorance but im an ASP.net newbie
my question is why am i always get the initial value of an html control attribute and not the modified one
I got the following defintion in my html -
In the client side i changed the "someval" to 'B' and submiting the form.
But ,checking the attribute value in server side return A while im expecting to get the new modified value
string test = imgFooter.Attributes["newval"].ToString()
|
|
|
|
|
Please check your code properly.I think your form is not submitted properly or the newvalue is not assigned.You can check it by using javascript that the variable value changeed before submiitng the form or not for verification.
Cheers!!
Brij
|
|
|
|
|
I have a site that is accessing a database housed on the local machine. The database has linked tables that are linked to files on a server. When I add a gridview that dispalys results associated to those linked files on the server I get the following error message:
'Y:\Macros\WFAC' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.'
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.OleDb.OleDbException: 'Y:\Macros\WFAC' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
I am using VS 2008 to build the site and when I test it in VS2008 it works fine, but when I try to pull it up outside of VS I get this error. I verified the path is right, but there is some issue reading the linked file "'Y:\Macros\WFAC' " this is within the DB that is on the local machine and not part of the acutal asp.net code?
Does anyone know how I can clear this error?
|
|
|
|
|
"Y:\Macros\WFAC" I dont think this is name of any file. it seems to be path to a folder. if WFAC is name of the file then give its extension.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
"Y:\Macros\WFAC" is the foler where a spreadsheet is housed. This spreadsheet is link to my database. I am trying to display a query in gridview from this database but it is giving the above error. I am not trying to access anything in "Y:\Macros\WFAC" directly from the webpage, but still get the error message. The database is on my local machine and "Y:\Macros\WFAC" is a remote server.
|
|
|
|
|
Hi,
How to raise Session_End event at Global.asax if I use SQLServer for session state. I want to clean up some data when user click X at their browser or if their session is expired.
Any help will be appreciate.
Thanks
|
|
|
|
|
mdpavel wrote: I want to clean up some data when user click X at their browser
Then you need to use the Javascript onunload event and make a request to the server telling it that the user is leaving the page. You can't use session state to catch when the user is leaving, as the server session doesn't end when the browser is closed.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Using a custom ExpressionBuilder doesnt seem to work with ParseControl (dynamically adding controls, that are using the custom ExpressionBuilder)
Works fine with the build-in Resources ExpressionBuilder though.
Anyone have a solution/workaround for this?
Or even an explanation for why it doesnt work.
Example
protected void Page_Load(object sender, EventArgs e) {
string s = (@"
<hr />
1: <asp:Label ID=""Label1"" Text=""<%$ Resources:language, Greeting %>"" runat=""server"" />
<br />
2: <asp:Label ID=""Label2"" Text=""<%$ IHLPResource:Greeting %>"" runat=""server"" />
<hr />
");
Control ctrl = ParseControl(s);
Page.Form.Controls.Add(ctrl);
}
1: Gets rendered just fine, while 2: fails (no error, the value just doesnt get rendered)
ie. the output is:
1: Hi
2:
(2: should say "\\\Output from custom ExpressionBuilder///" - See code below)
If I simply add the above to the aspx page, it works fine (ie. my custom ExpressionBuilder is not the cause of failure)
--------------------------------------------------------------------------------------------
CODE - For quick copy/paste to test yourself
--------------------------------------------------------------------------------------------
DynTest.aspx
<%@ Page Language="C#" AutoEventWireup="true" Codebehind="DynTest.aspx.cs"
Inherits="IHLP2007PoC.DynTest" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>WelcomeLabel Test</title>
</head>
<body>
<form id="form1" runat="server">
<hr />
1: <asp:Label ID="Label1" Text="<%$ Resources:language, Greeting %>" runat="server" />
<br />
2: <asp:Label ID="Label2" Text="<%$ IHLPResource:Greeting %>" runat="server" />
<hr />
</form>
</body>
</html>
DynTest.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace IHLP2007PoC {
public partial class DynTest : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) {
string s = (@"
<hr />
1: <asp:Label ID=""Label1"" Text=""<%$ Resources:language, Greeting %>"" runat=""server"" />
<br />
2: <asp:Label ID=""Label2"" Text=""<%$ IHLPResource:Greeting %>"" runat=""server"" />
<hr />
");
Control ctrl = ParseControl(s);
Page.Form.Controls.Add(ctrl);
}
}
}
IHLPResourceExpressionBuilder.cs
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.CodeDom;
using System.ComponentModel;
using System.Web.Compilation;
namespace IHLP2007PoC.Code {
public class IHLPResourceExpressionBuilder : ExpressionBuilder {
public override CodeExpression GetCodeExpression(BoundPropertyEntry entry, object
parsedData, ExpressionBuilderContext context) {
string evaluationMethod = "GetResourceString";
CodeTypeReferenceExpression thisType = new CodeTypeReferenceExpression(base.GetType());
CodePrimitiveExpression expression =
new CodePrimitiveExpression(entry.Expression.Trim().ToString());
return new CodeMethodInvokeExpression(thisType, evaluationMethod, new CodeExpression[] { expression });
}
public static string GetResourceString(string key) {
return @"\\\Output from custom ExpressionBuilder///";
}
}
}
Web.config
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug="true" >
<expressionBuilders>
<add expressionPrefix="IHLPResource" type="IHLP2007PoC.Code.IHLPResourceExpressionBuilder"/>
</expressionBuilders>
</compilation>
<authentication mode="Windows" />
<pages />
<globalization uiCulture="da" culture="da-DK" />
</system.web>
</configuration>
Expected output
--------------------------------------------------------------------------------
1: Hi
2: \\\Output from custom ExpressionBuilder--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1: Hi
2: \\\Output from custom ExpressionBuilder
Actual output
--------------------------------------------------------------------------------
1: Hi
2: \\\Output from custom ExpressionBuilder--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
1: Hi
2:
modified on Thursday, October 23, 2008 11:42 AM
|
|
|
|
|
Come now CP... No takers at all?
|
|
|
|
|
Hi
when I click on lnkAddTraveller link it always needs 2 times click on this link to execute lnkAddTraveller_Command event block.
How can I solve this problem.
lnkAddTraveler.Command += new CommandEventHandler(lnkAddTraveller_Command);
lnkAddTraveler.CommandName = "Hotel," + dtHotelInfo.Rows[i]["Id"].ToString() + "," + dtHotelInfo.Rows[i]["HotelID"].ToString();
private void lnkAddTraveller_Command(object sender, CommandEventArgs e)
{
//Code here
}
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
Hi,
I have a javascript code for pop window. I want to pass values from this calling page to that pop window and similarly i want to send some data from that window to this called page.
Plz Help me.....
Thanks in advance!
Lakshmi
|
|
|
|
|
you can access a value in Poppup window using Parent page(using window.opener).
Cheers!!
Brij
|
|
|
|