|
sumanmks wrote: am able to insert the values for the textbox web control. But not able to do the same for dropdownlist.
As CG Suggested, I will suggest you to buy some beginners .NET Books and start reading. Its quite surprise that you are able to insert records from Text Box , but not from Dropdown list.
Can you show us the code that you have written ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Good Day sumanmks
This is a Very Basic Question and it is covered in most Books. i will advice you buy a Book and Read it.
you said you were able to get the values in the Textbox, obviously you used something like this
String Value_To_the_DB = Text1.Text;
but now in a DropDown you have to go in your selectedindexchanged and get the Value there by adding a code like this
String Value_To_the_DB = DropdownList1.SelectedValue;
Hope this Help. Remember to buy a Book
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/
|
|
|
|
|
This is very Rude to delete messages !
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
I'm working on a legacy .net web-app where one of the pages displays a tree(which can expand/collapse the branches).
The html code for this tree is generated using an XSLT file.
Right now, we are experiencing a problem where the tree does not display at all when the generated tree has some 20,000+ leaves. In the normal case, or even when the tree has some 10,000 leaves, the tree is generated and displayed properly.
My question is if there is a known limit to how large this tree can be. Or if this is just a bug in the XSLT file that we have fix.
Thanks in advance for your help.
Rafferty
|
|
|
|
|
Actually if you write XSLT, it will render HTML in the browser. So if there is a limit, it would be the browser.
But I do think there is no limit in html AFAIK.
Lets see what others reply.
|
|
|
|
|
Updates: I have found that the tree will display after 3 (or more times) of refreshing the page and trying again. Does anyone know why?
@Abhishek Sur: Thanks for your answer.
Rafferty
|
|
|
|
|
I want to display record from a table in the datagrid control. For example The table stucture is
Address Table
Person Name
Address
City
Now I want the display in the data grid as follows
Person Name:name1
Address:add1
City:city1
Person Name:name2
Address:add2
City:city2
Person Name:name3
Address:add3
City:city3
Not Like This
Person Name Address City
name1 add1 city1
name2 add2 city2
name3 add3 city3
Can anyone help me offer a lead to work on this Thanx in advance
|
|
|
|
|
Then Why Grid ? Use Repeater Control
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Why Dont You Use ListView Control .So Its Easy to display Your Data as Per Your Requirement..!
If Its Not Your Answer Sorry..!
http://www.codeproject.com/KB/webforms/MenuControlSelectedItem1.aspx
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
|
Hi thanx to all for your valuable time to post to my query. Well I forgot to mention that I am still in the age of Adam & Eve I am trying this in asp.net version 1.1
I am currently researching with DataList or a repeater control. Will post back when I get it working in another say 12 hours from now. Did I say 12 hours 
|
|
|
|
|
Oh...
Then you need to look into Repeater. Its the only thing available to do this job in 1.1, I guess.
|
|
|
|
|
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.
|
|
|
|
|
Check This [^] Post. It may help you!
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hi,
Thank u for your earliest reply. But the solution in that link, provided as a reply is not applicable b'coz in that, the href is given to the image name field & not in the description field and i have tried with both the field & have not got the expected results. Kindly help me in the making this task as possible. Thank You.
|
|
|
|
|
Then You Have to Paste the Code So that Group may help..!
http://www.codeproject.com/KB/webforms/MenuControlSelectedItem1.aspx
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
As per the suggestion i have pasted the required things, 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);
}
|
|
|
|
|
can someone bring an example of sending email using asp.net c#?
|
|
|
|
|
You're basically asking us to reproduce what you could find with a simple web search. Why not search the web, RTFM, then post here if you get stuck AFTER trying to do something for yourself ?
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.
|
|
|
|
|
actually I tried, but I found examples with 'smtp host' and I don't know what to put in the smtp host(I tried some hosts and it's not working)...so I thought I could find another example here
|
|
|
|
|
We can't tell you the answer to that. You can't send mail without a mail server, that's your problem. You should be more specific, if your actual question is more specific.
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.
|
|
|
|
|
benams wrote: can someone bring an example of sending email using asp.net c#?
Yes Sure,
sending mail using C# and asp.net[^]
Hope this will help you
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Hello,
i've written code for sending mail in asp.net 2.0. I'm not getting any errror message,rather i'm receiving msg of "Message sent successfully". BUT STILL I'M NOT RECEIVING ANY EMAIL IN MY MAILBOX.I've written following code.
in .aspx page,
Imports System.Net.Mail
Protected Sub btn_Send_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_Send.Click
Dim message As MailMessage
message = New MailMessage(txt_From.Text, txt_To.Text, txt_Subject.Text, txt_Message.Text)
Dim client As SmtpClient = New SmtpClient("192.168.1.2")
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
client.Send(message)
lbl_msg.ForeColor = Drawing.Color.Red
lbl_msg.Text = "Message sent successfully !"
End Sub
and in the web.config, i ve written the following tab.
<system.net>
<mailSettings>
<smtp from="mail.eqlsoft.com">
<network host="mail.eqlsoft.com" port="25" defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
in addition to this i've configured my SMTP Server,as per guidelines in one of the forums on codeproject.
BUT i'm not very sure about the Smart Host name.
can you please help me... its urgent !!!
|
|
|
|
|
madhura apte wrote: can you please help me... its urgent !!!
No, it's not. We actually don't care if you can send mail or not.
madhura apte wrote: Dim client As SmtpClient = New SmtpClient("192.168.1.2")
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
This looks messy. Why not just read the server settings and send it in your code ? I mean, your message says 'sent successfully', but that means nothing, you just wrote that code. Could I use this mail server if I wanted ? No logon is required ? That seems odd to me. The whole thing looks convoluted to me. Just write a method that reads the mail settings from your web config and sends an email, then use that helper method throughout your code.
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.
|
|
|
|
|
I have to update a table based on some values in different dropdowns.
One of these values is part of composite primary key also.
In row_updating event, I have written the code to update the tabel.
Update table xyz set order=order_dropdown.selectedvalue, some more values... where emp_id=3,order=order_dropdown.selectedvalue.
Now in "where" and "set" clauses, order_dropdown.selectedvalue has used.
"where" should pick up the old value ideally but it will pick up latest value.
Due to this, updation does not take place.
So how to capture the original value in row_editing event and pass that original value in row_updating event?
|
|
|
|