|
in my application when i edit a row in a gridview for a particular column i have to display a dropdownlist thats ok but when the dropdownlist is loaded i have to display the selected value as the value that is retrieved from the database how is it possible?
this is the code for gridview for that particular column
<asp:TemplateField HeaderText="Mandal Type" ItemStyle-Width="30%">
<ItemTemplate>
<%# Eval("nMandalType") %>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="ddlMandalType" runat="server">
<asp:ListItem Value="0">--SELECT--</asp:ListItem>
<asp:ListItem Value="101" >Mandal</asp:ListItem>
<asp:ListItem Value="102">Municipality</asp:ListItem>
<asp:ListItem Value="103">Division</asp:ListItem>
</asp:DropDownList>
</EditItemTemplate>
<FooterTemplate>
<asp:DropDownList ID="ddlNewMandalType" runat="server">
<asp:ListItem Value="0">--SELECT--</asp:ListItem>
<asp:ListItem Value="101" >Mandal</asp:ListItem>
<asp:ListItem Value="102">Municipality</asp:ListItem>
<asp:ListItem Value="103">Division</asp:ListItem>
</asp:DropDownList>
</FooterTemplate>
<ItemStyle Width="30%" />
</asp:TemplateField>
|
|
|
|
|
4anusha4 wrote: <asp:dropdownlist id="ddlMandalType" runat="server">
<asp:dropdownlist id="ddlMandalType" runat="server" text="<%# Bind("value here") %>">
|
|
|
|
|
|
hiii all...
m using animation extender for panel control but its giving me error:"animation extender cannot be set on property animation...."guide me....
|
|
|
|
|
Hi,
I am using .NET to query indexing server (search engine for our Intranet)
If the user searches for "the,he,she,in" or "a" etc they will get an error page stating - "(The query contained only ignored words.)"
What is the best way to catch this and deliver something meaningful back to the page.
|
|
|
|
|
There is some field in gridview bound to SQL db field, how to change its value in _RowDataBound event?
e.g. GridView.ImageField.DataImageUrlField is bound to ImagePath column from db. I need to change the path during the row data bound event and set updated value to GridView.ImageField.DataImageUrlField
Чесноков
|
|
|
|
|
It would be something like that, Find the control use FindControl Property and the change the property. Below code is dummy. just for your idea.
protected void Gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[3].FindControl("Img") != null)
{
((ImageField)(e.Row.Cells[3].FindControl("Img"))).ImagePath= path;
}
}
}
catch
{
}
This 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.
|
|
|
|
|
Cannot convert type 'System.Web.UI.Control' to 'System.Web.UI.WebControls.ImageField'
Can we not bind to specific cell number?
Чесноков
|
|
|
|
|
i work on these step but it doesnot work
Open IIS from command prompt or Control Panel -> Administrative Tools -> Internet Information Services
Find the folder for your project on IIS.
Right click on folder, click on Properties
On Directory tab, you will see the "Application Name" towards the end. Click on the Create button. If its already created, click on Remove then click on Create to recreate it.
|
|
|
|
|
Sorry for truncating your message subject. It was look odd.
Do you have multiple web.config ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Yes buddy.. We can have multiple web.config files but each will reside in each folders. Means we can have 2 folders having 2 web.config, but never have 2 web.config in a single folder.
|
|
|
|
|
That I know I was asking him, because some times its cause this error when you are not directly pointing the actual folder means if you are pointing one folder up than the folder you need to point. What asp.net do, it will create an web.config for current root folder and will throw this error.
I have faced this problem a few time
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Yaah.. Its true..
|
|
|
|
|
He is Right i might have two web config files. Remove the one you dont need
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
i have only one webconfig file
|
|
|
|
|
Show me the Screenshoot of your Solution Explorer collapse everything and sent it to my e-mail vuyiswamb@gmail.com
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.somee.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi i am binding my database values to repeater control using pageddatasource...,
now i want to show above the repeater...,
total number of records and displaying values...,
means for ex:
like our code project in the forum they displayed which datas are getting show and the total number of records
if i have 13 records and my paging size is 5
thn load time it have to show like this...,
1-5 from 13
and then pageindex change
it have to show
6-10 from 13
thne another page index it have to show
11-13 from 13
if i click prev button
then it have to show
6-10 from 13 like
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
I am not sure if the built in paging will do that, or if you need to write your own code to show that data. I suspect the latter.
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.
|
|
|
|
|
My button event is stopped working sudenly............i dont knw whts reason .............plz guide me
|
|
|
|
|
Your code is broken. What else can we say, based on what info you've given us ( that is, none ) ?
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.
|
|
|
|
|
KhandelwalA wrote: My button event is stopped working sudenly
What does it mean ?
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
I mean.........I have added an link button on my page and it was working fine......I added one animation extender to login, one list view with checkbox to edit..........and it was working fine with link button, but suddenly it stops wrking........i dont know whats reason........do i need to run aspnet_regiis.exe -C............I checked handles clause also which appears in the end of event....plz guide me
|
|
|
|
|
It sounds like you have only the vaguest of ideas what you're doing at all. If you needed to run aspnet_regiis, then your page would not show up at all.
Think back to what you did since it last worked. Try going back to an earlier version of the page in source control, and adding one change at a time until it stops working. This is basic programming 101.
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.
|
|
|
|
|
click the button and go to the property and select events.... in that check whether the button has the event(make sure by double clicking it)... if it points to a new event with someother name like button_Click1 then change it to button_Click or your actual event....
|
|
|
|
|
that i did............but still the same problem..........any specific reason behind this problem ?
|
|
|
|