|
Pls be clear in your question.
SSK.
|
|
|
|
|
let me explain...........
public object Value;
public object Value1;
public string Description;
public ValueDescriptionPair(object NewValue, string NewDescription)
{
Value = NewValue;
Description = NewDescription;
}
public ValueDescriptionPair(object NewValue, object newvalue1, string NewDescription)
{
Value = NewValue;
Value1 = newvalue1;
Description = NewDescription;
}
public override string ToString()
{
return Description;
}
----------------------------------------------------------------------
i created one value pair like this......
for that i will get a set of values which overides .Value method
----------------------------------------------------------------------
ddlCountryService.Items.Add(Convert.ToString(new NRIValueDescriptionPair.ValueDescriptionPair(dtr[0],dtr["fld_CountryId"], Convert.ToString(dtr["fld_CountryName"]))));
-----------------------------------------------------------------------
Here i could able to set the values also......
-----------------------------------------------------------------------
obj.CountryId= Convert.ToString(ddlCountryService.SelectedItem.Value);
--------------------------------------------------------------------------
but....
i couldnt able to get the value by .Value method...
it is not overriding... i did this nicely in windows apps.....dont know y its not happenning in web apps
----------------------------------------------------------------------------
hope it will be clear for you now.....
help me....
|
|
|
|
|
i am creating a usercontrol that contains 2 textboxes and a button.textboxes are web controls .i want to check when i click in button whether textboxes contains value or not? is it possible to write a javascript function inside a usercontrol?
i tried
if(document.getElementById('Name').value=="")
{
alert("Name can't be empty");
}
but it's not working?
with regards,
Anu
|
|
|
|
|
anujose wrote: if(document.getElementById('Name').value=="")
You will get error on this line, if control Name is a server control. This happens because ASP.NET appends user control name with the server side controls to make control id unique. So you need to view source of the page and find out how your control is rendered. Usually it will be like usercontrolname_controlname . Find this name and use that in javascript.
|
|
|
|
|
anujose wrote: 'Name'
'<%=Name.ClientID%>'
|
|
|
|
|
|
Hi all,
I need your help in replace function.........
Please look the code below.....
<br />
string File;<br />
File = "C:\\Documents and Settings\\sxavier\\Desktop\\prasobh.doc";<br />
string strFileName = File;<br />
I would like to replace \\ with \... I have tried the line below , but will not work....
strFileName = strFileName.Replace("\\", "\");
Please guide me ....
Thanks in advance
Sebastian
|
|
|
|
|
Sebastian T Xavier wrote: strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace("\\", @"\");
|
|
|
|
|
Thank you Navneet,it worked
sebastian
|
|
|
|
|
Sebastian T Xavier wrote: strFileName = strFileName.Replace("\\", "\");
It breaks "Build" with the error "Newline in constant".
Sebastian T Xavier wrote: strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace(@"\\", @"\");
|
|
|
|
|
Thank you...........
sebastian
|
|
|
|
|
hi,
try to use / instead of \ otherwise use @"\".
\ is a new line character in C# and your code will work only in vb.net.
So it is better to avoid it.
All The Best
Sathesh Pandian
|
|
|
|
|
Thank you.............
sebastian
|
|
|
|
|
try with this
Replace("\\", @"\");
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
Thank you...........
Sebastian
|
|
|
|
|
hi
can anybody tell me how to update the database after modifications are done in a dataset.
dotnetSoft
|
|
|
|
|
|
You need to specify update command for the DataAdapter. Then use DataAdapterObject.Update(DataSetObject)
|
|
|
|
|
hi,
i am doing an application in which , i want to implement vallidatorcalloutextender
when i implemnt this control without updatepanel it is working smoothly but when i put this in updatepanel it is showing some javascript error like this
"Sys.ArgumentNullException:Value cannot be null Parameter name:element"
if anybody knows please reply
|
|
|
|
|
Hi Guru's,
I'm working with datagrid control using template column to bound data on each column, on my grid I used linkButton to redirect to another page, I want to add query string on my postbackurl below is my code:
<asp:LinkButton ID="lnkProd" runat="server" PostBackUrl='xx.aspx.com?pID=<%#databinder.eval(container.dataitem,"productID")%>'>Products</asp:LinkButton></ItemTemplate>
but when I click the links it returned with %3C%#databinder.eval(container.dataitem,%22productID%22)%%3E
Please advice.
Thanks
|
|
|
|
|
What is "xx.aspx.com" ?
try with this
PostBackUrl="xx.aspx?pID=<%# DataBinder.Eval(Container.DataItem,"productID")%>"
Best Regard
Pathan
GOD HELP THOSE WHO HELP THEMSELVES
|
|
|
|
|
I rewrite it to
PostBackUrl='xx.aspx?pID=<%# DataBinder.Eval(Container.DataItem,"productID")%>'
But still no luck.
Dom
|
|
|
|
|
Try replacing ' to " .
Are you trying to do something when LinkButton is clicked ? Is yes you can handle this using ItemCommand event, instead of passing querystring on postback.
|
|
|
|
|
Yes that's what I wanted to do, passing query sting upon clicking on link button, I was under the impression that placing it on Postbackurl will do shorted job I might look on HyperLinkColumn instead.
Thanks,
I'll still figure it out.
tah tah
|
|
|
|
|
i am doing an application i which, iam having a form which includes textboxes,and cascading dropdownlists and one gridview.
what i did in the code is, when i click on the gridview i wrote a stordprocedure to take all values wat i want from the database and bind it in one datasetand assigning the dataset values to the corresponding textboxes and dropdownlists .
for ordinary dropdownlists, the values are populating correctly in their indexes using this code as show below
dropdownlist.SelectedIndex = dropdownlist.Items.IndexOf(dropdownlist.Items.FindByText(dataset.Tables[0].Rows[0]["column1"].ToString()));
but for cascadingdropdownlist,this code willnot work
if any body knows the answer please reply me
|
|
|
|