|
Along with the control suggested by Mike, you can have a look into Repeater Control Or Use XSLT to render data on page
|
|
|
|
|
Hi,
How to fill the dataset rows with serial number?
Thankyou
YPKI
|
|
|
|
|
Use AutoIncrement, AutoIncrementSeed, and AutoIncrementStep properties for a DataColumn with type Int16, Int32 and Int64.
DataColumn column = new DataColumn();
column.DataType = System.Type.GetType("System.Int32");
column.AutoIncrement = true;
column.AutoIncrementSeed = 1000;
column.AutoIncrementStep = 10;
DataTable table = new DataTable("table");
table.Columns.Add(column);
|
|
|
|
|
Serial number is for presentation purpose and I'd suggest you not to add it on your data structure (DataSet in your case). Handle it when you display the value. For example, if you are binding it to a GridView , you can do something like,
<%#Container.DataItemIndex+1 %>
|
|
|
|
|
Hello.
I wasn't able to find much help on StructureMap's website, so I'm hoping perhaps I can find some help here. I think I have just a small bug in my StructureMap code, but I'm not sure where....
I'm trying to install structuremap into my 1st website but I'm unable to successfully reference classes set within structuremap. I have 2 projects: a c# class library (MyCompany.MySite.Core) & my website (MyCompany.MySite.Web). My structuremap.config contains a reference to a class I created called "IRedirector". The config file looks like the following:
<?xml version="1.0" encoding="utf-8" ?>
<StructureMap>
<Assembly Name="MyCompany.MySite.Core" />
<Assembly Name="MyCompany.MySite.Web" />
<PluginFamily Assembly="MyCompany.MySite.Core" Type="MyCompany.MySite.Core.Impl.IRedirector" DefaultKey="Default"/>
</StructureMap>
My IRedirector class looks like this:
namespace MyCompany.MySite.Core.Impl
{
[PluginFamily("Default")]
public interface IRedirector
{
void GoToHomePage();
void GoToErrorPage();
}
}
Now, as I understood it, I should be able to reference this class in my website by referencing MyCompany.MySite.Core, but I get an error. Instead, my website wants MyCompany.MySite.Core.Impl.
For example, the following is incorrect:
using MyCompany.MySite.Core;
namespace MyCompany.MySite.Web
{
public class Global : System.Web.HttpApplication
{
protected void Application_Error(object sender, EventArgs e)
{
IRedirector redir = ObjectFactory.GetInstance<IRedirector>();
redir.GoToErrorPage();
}
}
}
In that example, the line beginning with "IRedirector" will throw an error, unless I add a reference to "using MyCompany.MySite.Core.Impl;"
I want to reference it using only "MyCompany.MySite.Core". Any idea what I'm doing wrong?
Thanks.
|
|
|
|
|
Goalie35 wrote: I have 2 projects: a c# class library (MyCompany.MySite.Core) & my website (MyCompany.MySite.Web).
Goalie35 wrote: my website wants MyCompany.MySite.Core.Impl.
Goalie35 wrote: unless I add a reference to "using MyCompany.MySite.Core.Impl;"
All are contradictory statements. You said you have only two projects, so where does the MyCompany.MySite.Core.Impl came from? If MyCompany.MySite.Core.Impl is just a name space inside project MyCompany.MySite.Core , you need to add proper namespace includes at the place where you use it.
using MyCompany.MySite.Core;
using MyCompany.MySite.Core.Impl;
namespace MyCompany.MySite.Web
{
public class Global : System.Web.HttpApplication
{
}
}
|
|
|
|
|
Hi Navaneeth. Thanks for your reply.
I'm actually following along in a book I'm reading (ASP.NET 3.5: Social Networking) and in this book, his examples say to declare the namespaces in this fashion along with using StructureMap. So that's where I'm stuck. I've visited a few sites offering tips on StructureMap & they seem to have similar examples but unfortunately, mine doesn't work.
The MyCompany.MySite.Core.Impl namespace is a subdirectory called "Impl" within my Core project (again, an example within the book).
Hope that makes more sense
Thanks again.
|
|
|
|
|
Goalie35 wrote: The MyCompany.MySite.Core.Impl namespace is a subdirectory called "Impl" within my Core projec
In such case, you only need to refer the core dll. Just use the name space as I said in my earlier post. Is this a huge application? IMO, using dependency injection frameworks like structure map for simple applications will introduce unnecessary complexity to the application.
|
|
|
|
|
how can a have a webbrowser inside my asp webpage?
i add reference system.windows.forms and and webbrowser in toolbox, but it is disabled
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
nelsonpaixao wrote: i add reference system.windows.forms and and webbrowser in toolbox, but it is disabled
You can't use that. Why do you need a browser in your web pages?
|
|
|
|
|
it´s for a browsergame bot, i need a "window" to view the bots work (in the asp page)
i can do it on c# application but my pc is not connected 24 X 7, so i have to use a web host page
just need some guidence here, no need to post code
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
nelsonpaixao wrote: i add reference system.windows.forms and and webbrowser in toolbox, but it is disabled
That you would even try to do this, shows you have no idea what you're doing. I suggest reading a book on ASP.NET and trying to understand how the internet/ASP.NET work.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello Everyone
i am trying to use autosuggest for the textbox in asp.net(Web application) .The scenario i am looking for is when user types in 2-3 letters it should show him list of items which starts with those letters and he can select from the list.I got this issue solved.
But when user hits enter and goes to next line(Multiline textbox) and types next set of letters there is no list coming up as its appending selected old value with the new typed letters.
And also i want the output the user selects to be shown where the cursor is pointed.
hope i am clear with my issues please somebody suggest me any solutions
Appreciate your'e time and help.
Thanks
|
|
|
|
|
I suspect you'd be making an AJAX call to check the string, so check on just the last line, you can use string.Split for this.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello Christian
i tried using string.split and used '.' as starting char so that i know the user is typing new string to search.But still the data is appended to the Editor so please can you send me a sample so that i can check my code with urs.
thanks alot
|
|
|
|
|
|
Hello Blue_boy
that is exactly what i am looking for but can you send me a simple code for it i did uses ajax AutoCompleteExtender with script manager but didn't have luck with it please if you have sample code can you send it to me
appreciate your'e time and help
Thanks
|
|
|
|
|
Hi Blue_Boy
i tried the code which you send me this is the error message i get
Type 'AjaxControlToolkit.AutoCompleteExtender' does not have a public property named 'CompletionListCssClass'.
not sure what exactly i am missing
Thanks
|
|
|
|
|
Hi,
I don't know which is more easy then this [^] way to archive your goal.
The most easy way should be if I write code for you but currently I am busy in my project.
Just follow steps and all will be done successfully.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Hello blue_Boy
Oh i don't want any code(want to try this one on my own) i tried my best the code is all there but its still appending the search data like the demo you sent me if we search for
Tar it pulls all the list that starts with tar and when you select it replaces Tar with the selected info and then when you do second search with space it does the same thing
The code i have is its appending the Tar with the selected item
So trying my best thanks for your'e help
Will try in a different if it doesn't work will send you my code
Thanks once again
|
|
|
|
|
kavyamark wrote: Will try in a different if it doesn't work will send you my code
Great,so I and others will be here when you stuck somewhere.
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
hello Blue_boy
I tried the below exact code what its doing is it replacing the old value with new and also when i search for second set of string it appends the selected text also
http://www.c-sharpcorner.com/UploadFile/munnamax/AutoCompleteExtender08062007113854AM/AutocompleteExtender.aspx
for example if i search for Tan it shows up the words Tanner,Tannie
when i select Tannie it shows up in the Textbox,but when i type second search like
ta it searches for tannie ta and gives nothing
So please can you help me with that little code.
Appreciate it
|
|
|
|
|
hi blue_boy
the scenario i am looking for is like the below image(not able to add teh images how can i add the image) when user types in 2-3 letters in Richtextbox or text area a dropdown list will pop up and he can select any item after that he can give space n type in with a .tak then it will pull up another list where h e can select second item.
thanks
kkmark
|
|
|
|
|
I received this message?
Syntax error, command unrecognized. The server response was:
I do not know the port number that is configured at web-config. Would it cause that error..
|
|
|
|
|
When you received the error?
|
|
|
|