|
hi
how do i load table information into aspxcombobox ?
|
|
|
|
|
zizigolo110 wrote: how do i load table information into aspxcombobox ?
You need to load data into data source from table. Set the Combobox data source and data value properties.
It seems you have joined code project today ! so first of all welcome to Code Project !
Please read forum guide line before ask any question over here.
Thanks ! All the best !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
zizigolo110 wrote: how do i load table information into aspxcombobox ?
As AJ Suggests Try to Extract the data into DataSource.You Add The DataSource By the following Way
DropDown1.DataSource = YourDataSource;
DropDown1.DataTextField = "Name";
DropDown1.DataValueField = "Id";
DropDown1.DataBind();
DropDown1.Items.Insert(0, "Select");
Welcome To Code Project
|
|
|
|
|
hi friends,
am developing a live chat web application using asp.net+ajax+c#.
i have taken multi line text box to display messages. i added some JavaScript to maintain text box scrollbar position at the last message.
here my problem is....if i want to scroll the scroll bar upwards to see previous messages,,,the scroll bar is not going up..it always staying at last message.i cant overcome this problem...
i have taken timer, update panel and 2 text boxes.one textbox to type message and other to display message.i kept timer and multiline textbox(to display messages) in update panel.
please do some favour to me in this issue..thanks in advance.
|
|
|
|
|
sasirekha wrote: i added some JavaScript to maintain text box scrollbar position at the last message.
No Need To add JavaScript For adding Scroll Bars .It Will Generate Automatically.!
Are You Adding the message in the textbox with the New One.If Yes Check the Message is Fully Present or not.
|
|
|
|
|
The issue is with the timer. If you continuously place the data within a timer to a textbox it will automatically go to the bottom of the scroller.
See, If you just paste a text within a textbox, the cursor moves to the bottom of the scroller. So this is your case.
If you need to move the cursor to the top, just after the text is copied. Use this after you set the text to the textbox.
var oTextbox = document.all.item(sTextboxID);
if (oTextbox.createTextRange)
{
var r = (oTextbox.createTextRange());
r.moveStart('character', (0));
r.collapse();
r.select();
}
}
See it it works or not..
|
|
|
|
|
Hi,
I am working with VS.Net 2008 application & am in need to provide some link (for ex: http:www.google.com)to the Images that are shown in the slideshowextender ajax control in asp.net with c#. On the click of the every single image a new window with the corresponding URL(retrieved from the DB) should get open. Kindly help me in getting through this. Waiting for your response. Thank You.
I have pasted the html source code & code behind use , Pls help me...
Design page
This Design page is an user control & iam accessing the GetImage Method from its Parent page, in which i wrote the Code (pasted below)
<asp:Image ID="image1" runat="server" Height="150px" Width="230px" />
<br />
<cc1:SlideShowExtender ID="SlideShowExtender1" runat="server" AutoPlay="true" Loop="true"
SlideShowServiceMethod="GetImage" TargetControlID="image1">
</cc1:SlideShowExtender>
Code behind page
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] GetImage()
{
string promophotos, promoimages;
SqlDataSource ds = new SqlDataSource();
ds.ConnectionString = ConnectionString.Str_SqlCon_CmInfoline.ToString();
string mySelect;
int count = 0;
mySelect = "select Tooltip,BschoolName,Imageurl,UrlPath from Tbl_InfolinePromoPhotos";
ds.SelectCommand = mySelect;
System.Data.DataView dv = (System.Data.DataView)ds.Select(new DataSourceSelectArguments());
count = dv.Table.Rows.Count;
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[count];
try
{
for (int i = 0; i < count; i++)
{
promophotos = dv.Table.Rows[i]["Imageurl"].ToString();
string[] photopath = promophotos.Split(',');
promoimages = photopath[1];
slides[i] = new AjaxControlToolkit.Slide(Global.contentUrl + "/Admin/Bschool/PromoPhotos/" + promoimages.TrimStart('.'), dv.Table.Rows[i]["Tooltip"].ToString(), dv.Table.Rows[i]["UrlPath"].ToString());
}
}
catch { }
return (slides);
}
|
|
|
|
|
Why ask this twice ?
What you need to do is put an index on the URL and start the slideshow from that index if it's browsed to that way.
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.
|
|
|
|
|
|
jknascrimz wrote: Sorry for repeating this Question bcoz i didn't get any correct solution till now thats y i made it again.
You should wait. Please read forum guideline. Here every body want to helps you. If some one knows the answer they will definitely reply you !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Sorry for my disturbance
I will not repeat this mistake...
& thanks for ur co-operation...
|
|
|
|
|
Christian Graus wrote: Why ask this twice ?
May be he expecting two different approaches.
Cross Post, Message Delete is now very much common with this ASP.NET Forum.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I want to fetch data from three tables according to itemcode .and item code is entering only two tables.
plz help me
|
|
|
|
|
What is with the run of stupid questions ?
First of all, this has nothing to do with ASP.NET, you should be asking in the SQL forum
Second, you can't possibly expect or want help. If you did, you'd ask a question that could be answered. We can't work out what you need to do, without knowing the schema of the tables.
Third, if there's no other ID you can use to link these tables, then it's probably not possible, and you need to talk to whoever designed the database and get them to fix it. You should not attempt it yourself, because it seems you don't really know anything about databases.
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.
|
|
|
|
|
rummer wrote: I want to fetch data from three tables according to itemcode .and item code is entering only two tables.
How this is related with ASP.NET ? You need to write simple SQL query with join operation.
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
How is this possible?
Can you show ur table structure.
You should have posted this in Database forum.
|
|
|
|
|
Then the third table must contain any key column from other two tables or somehow it should be connected to other two tables.
Provide the table schemas to get more help.
|
|
|
|
|
You can use a Join
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Oh, seriously. One stupid question, and it needs 6 answers, all increasingly clueless ? What does this add to the discussion ? He plainly has no idea what a join is, and the issue is, there's no indication that he has anything to join to, in the third table. I expect that's why he's asking the question, even if he does ask it so inadequately.
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.
|
|
|
|
|
It is very much frustrating when people don't reply when some one wants to help him . It may happen after some time he will delete his post .
These are useless !!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
|
Well, I'm not sure what you want here.
1 - this is not an ASP.NET question
2 - how can we tell what your problem is, based on this vague question ?
The SQL is the same, no matter where the text comes from. Use your debugger to work out what's going wrong, and ask a more specific question if you need to
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.
|
|
|
|
|
sorry for not begin clear enough.Well i am working on a asp.net platform using visual studio 2008 and i need to store a value which is selected in the dropdownlist web control into a database (MYSQLEXPRESS).i am able to do with text box web control
|
|
|
|
|
You just restated the question. You've added NOTHING to the situation. Here are some things to consider
1 - your database has no idea where your data comes from. Therefore, I have to assume your problem is with interacting with controls, because the SQL code will be the same
2 - I've already told you to use the debugger - have you ? You don't give us any clue what your code looks like, or what it is doing, so we can't really help you, but the first step, is to walk through the code and work out at what point you're failing to get your value.
Having experience with this sort of idiotic question, I am willing to make a guess. Your problem, although you've not said so, is that the wrong value is stored. This is because you bind to the datasource in page load ( the wrong place ), on postback ( the wrong time ). If I am utterly wrong, it is because the only way this question makes sense, is if you were trying to test our ability to work out solutions based on zero information. If you want actual help, you need to know enough to be able to explain what is exactly going wrong, and what exactly you've tried to fix it. Until you do that, I have to consider that you don't even have the skills to ask for help, let alone write any code.
Seriously.
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.
|
|
|
|
|
sumanmks wrote: sorry for not begin clear enough.Well i am working on a asp.net platform using visual studio 2008 and i need to store a value which is selected in the dropdownlist web control into a database (MYSQLEXPRESS).i am able to do with text box web control
ARGH !!! We are trying to HELP YOU. How does deleting your posts and not answering our questions, solve your problems. I may not be polite, but that's because you're plainly doing work you're incapable of, and you're not answering me. Answer our questions if you want help.
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.
|
|
|
|