|
I think its because you have created the controls dynamically. Check whether you have given unique names for each control like txtOne,txtTwo etc. Pick the values from the controls at runtime and load them into arraylists. Then it will be possible
|
|
|
|
|
Hello Sir,
I am created tempalte columns in the datagrid dynamically with some text box and drop down , i am given unique id also to them, but in data grid there can be more than one row with same control and data grid render its own id like - dg__ctl02_txtAmt.
The thing is that if i am using dgGrid.Items.Count - its shows zero , even though it got more than two rows.
Sorry if i am not clear to you.
Vipin Raj
|
|
|
|
|
Try using panel instead of datagrid
|
|
|
|
|
While submitting the page retrieve these values through Javascript and store all the values by making comma separated in the hidden variable and then access those values on server side from hidden variable.
I would like to know one more thing that in Page_Load event whether you have written or not 'If (!IsPostBack)' . If you have not written this condition then there might be the chance that during Page_Load event firing these controls are removed if you are generating the control dynamically. If you put this condition and try to retrieve these controls value with in this condition then you might be able to retrieve it.
Satish Agrawal
|
|
|
|
|
Is it possible to login to a site from our c#/asp.net application using httpclient and thereby start a new session? If so, kindly provide me with the code or any links to it. Thanks in advance for your help.
natraj
|
|
|
|
|
hi all
in my application i want a roll over effect. That is when i put my mouse over a image it should change to a different image but when i move my mouse back from the image it should the old image.
my code is like this in the asp file
<asp:gridview width="100%" id="GridView1" runat="server" autogeneratecolumns="False" datasourceid="SqlDataSource1" gridlines="both" showheader="False" pagesize="20" visible="False" allowpaging="True">
<columns>
<asp:templatefield>
<itemtemplate>
Before
<asp:image id="Image1" runat="server" imageurl="<%# Eval("AfterImage") %>">
<itemstyle horizontalalign="Center" verticalalign="Middle">
<asp:templatefield>
<itemtemplate>
After
<asp:image id="Image1" runat="server" imageurl="<%# Eval("BeforeImage") %>">
<itemstyle horizontalalign="Center" verticalalign="Middle">
<pagersettings position="TopAndBottom" nextpagetext="Next" previouspagetext="Previous">
<pagerstyle horizontalalign="Center" verticalalign="Middle" font-size="X-Large">
<asp:sqldatasource id="SqlDataSource1" runat="server" selectcommand="SELECT [BeforeImage], [AfterImage], SortOrder FROM [GalleryWomen] ORDER BY SortOrder ASC" connectionstring="<%$ ConnectionStrings:MMPCConnectionString2 %>">
I want to implement the new roll over effect. actually i dont want to hard the source file eg xyz.jpg. i am using a sql table to populate the grid of iamges so pl help me out.
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
You need to click 'Ignore HTML tags' in your post for your code to come out right.
Paul Marfleet
|
|
|
|
|
Hi
i am using drop down in update panel but i am not able to fill another drop down on selected index change of first drop down can any one tell the reason
|
|
|
|
|
There is an specific control type in the ajax control toolkit, cascadingdropdown which might be better?
|
|
|
|
|
hi all,
in my web page i have one dropdown list it contains Email and Phone values.
and i hav email and phone textboxes.
now the thing is if i select email from drop down list i want Email as mandatory,
if i select phone from dropdown list i want Phone as mandatory!
how to achieve this?
i have written my code as follows!
if (ddlCmethod.SelectedValue == "Telephone")
{
valmanEmail.IsValid = false;
valmanPhone.IsValid = true;
}
else
{
valmanPhone.IsValid = false;
valmanEmail.IsValid = true;
}
|
|
|
|
|
i think if the valmanPhone is required field validator or any validator
you should not set IsValid property
you need to set IsRequired property true ro false
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
thanks for the reply
but there is no IsRequired property.
|
|
|
|
|
OOPs
What problem are you facing is it not firing the validation properly ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
actually thing is...
i want to made a field is require as per the dropdownlist item selected.
means if i select Email from my dropdown list the the Email field must become mandatory and phone field will be normal means not mandatory.
if i select Phone then phone filed must become mandatory and Email field will be not mandatory.
how to achieve this!!!
|
|
|
|
|
for what control u are trying to set the IsValid=false ..i.e is valmanEmail is a validator control? if so then set Enabled = false;
Koushik
|
|
|
|
|
Thanks for reply...
no its not working!!!!
|
|
|
|
|
You can achive through Dropdown on click Javascript event.
Based on the selected value
function EnableValidator()
{
if(document.getElementById('<%=ddlCmethod.ClientID%>').value=='Telephone')
{
ValidatorEnable(document.getElementById('<%=valmanEmail.ClientID%>'), false);
ValidatorEnable(document.getElementById('<%=valmanPhone.ClientID%>'), true);
}
else
{
ValidatorEnable(document.getElementById('<%=valmanEmail.ClientID%>'), true);
ValidatorEnable(document.getElementById('<%=valmanPhone.ClientID%>'), false);
}
}
Just call 'EnableValidator()' function on click of the dropdownlist
This will work.
Shanmugam R
|
|
|
|
|
hey thanks for ur response!
but there is no property called OnClick for dropdown list!!!
|
|
|
|
|
Just include the following code on server side (Form Load event).
drpList.Attributes.Add("onchange", "JavaScriptFunctionName();"); or
drpList.Attributes.Add("onclick", "JavaScriptFunctionName();");
We can add properties using the Attributes method.
Shanmugam R
|
|
|
|
|
I am using asp with c#. When I try run a project localhost.
I use a following step.
1. First Step right click the folder and web sharing.
2. Go To IIS And Click The Right Click Project Folder (Browse Button)
3. Then Click Any aspx Page then create problem.
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'http://localhost/Mcp/Forms/frmAddType.aspx'. Line...
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="frmAddType.aspx.cs" Inherits...
please help me urgently
|
|
|
|
|
I want to make the footer templet of datagrid readonly while click on edit button one thing i want to make clear in ur mind that there are two textboxs in footer templet one for id and second for name but in edit templet only one textbox is there which one is for name only so my question is that when i click on the edit button of the grid at that time the focus should not be gone into the any of textboxes which are placed in footer templet so how can i overcome this problem and get a solution.
Hiren Dave
|
|
|
|
|
I have a gridview in which a listbox is there. I want to catch the selected change event of the listbox .when the new item is selected i have to replace the data. of the row .
Can anyone help me out .
|
|
|
|
|
Find out listbox on RowCreated event of gridview and create selected event of list box.
for Example
OnRowCreated Event
ListBox lstBox=(ListBox)e.Row.FindControl("ListBoxID");
lstBox.SelectedIndexChanged+=(Press Tab 2 times here);
Protected lstBox_SelectedIndexChanged(....)
{
}
bEst rEgard
pAthan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi all,
i am developing one web site!
in my web page i have one dropdown list for Select language.
how can i change the language for whole content of the pages!
can any body suggest me!
|
|
|
|
|
Get all strings from a resource file, and change the file you use, based on the language settng.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|