|
N a v a n e e t h wrote: Are you using a content place holder ?
Yes I am using content place holder.
N a v a n e e t h wrote: Viewstates will be loaded before page_load fires. Getting viewstate depends on where you are creating dynamic control. If it is in page_load or any other events fired after Init(), it won't be maintained. If ASP.NET want to maintain viewstate for your dynamic control, create it on Init() event.
I am creating dropdownlist on Page_load event. I want to use value of this dropdownlist for other control in Page_load event.
|
|
|
|
|
priyank_ldce wrote: Yes I am using content place holder.
Well, if you are using Content place holder, then what is the issue ? FindControl() is not working for you ?
|
|
|
|
|
Hey everybody
Does anyone know if its possible to use Yahoo widgets in ASP.Net 2.0??
I see that in the com tab of the Add Reference dialog box that there is a YahooWidgetEngine option....
I tried to add a reference to it and use Yahoo widgets but im not getting it right. I also cant find anything on the web?
If anyone has done it or has a reference to a tutorial on how to do it...please let me know.
Thanks
Dazz
|
|
|
|
|
|
hai all,
i want to show a particular position in aspx page when page loading...
because when i click drop down list,the page wil reload and show its top of the page...
but i want to display the bottom of the page when the page loading......
Any one know reply me....
Thanks And Regards,
vidyasankar N
pain gives gain
|
|
|
|
|
Vidyasankar,
please spacify the smart navigation true . This will resolve your problem.
jitendra
|
|
|
|
|
Hi All
In My page i have written the Server.Transfer within try catch block but whenever i am hiting this page first time it is giving me " Exception Occured at the time of server trasfer is :System.Threading.ThreadAbortException: Thread was being aborted."
i read one artilce regarding this issue but i am not confessed what they are saying.
Anyone body knows what should i do ? and whats the problem ?
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... "
|
|
|
|
|
This exception is not problematic use catch block with
ThreadAbortException and be continue..
Best Regards,
Chetan Patel
|
|
|
|
|
Yes i did that got information from net also thanks for reply
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... "
|
|
|
|
|
Hi,
I am facing very weird problem with dropdown onclick event in IE 7.0 for ASP 3.0 application
When page gets load, I fill a dropdown control from the database & while doing so I set the Text of the very 1st option as 'Use Drop Down to select value' (followed by values from the database)
Eg:
Use Drop Down or 'Find' to locate a skill
I am calling the following function on onClick event of that dropdown & that function (ChangeText) empties the text of the 1st Option (i.e. it removes the 'Use Drop Down or 'Find' to locate a skill' text)
Eg.
Regards,
Vipul Mehta
Sr. Software Engineer
Accenture Services Pvt Ltd
|
|
|
|
|
It works!
Thanks a lot for the advice.
Cheers!
Yenyen
|
|
|
|
|
My Pleasure
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... "
|
|
|
|
|
Hello Everyone,
Can anybody let me know how to print the text stored or written in an IFRAME
into a STRING variable.....................................
Thnx
|
|
|
|
|
I am working on this problem a couple of days, I did not get solution.
in my web page , there is a gridview with a checkbox templatefield
I need to know if checkbox is checked, I use following way, Even though I saw the checkbox is checked, I get checkbox.check is false.
<asp:gridview id="GridView1" runat="server" datakeynames="empid" cellpadding="4" forecolor="#333333" gridlines="None" width="335px">
<columns>
<asp:templatefield>
<headertemplate> <asp:checkbox id="chkall" runat="server">
<itemtemplate>
<asp:checkbox id="chk" runat="server">
protected void Button1_Click(object sender, EventArgs e)
{
string EmpId="";
//bool chkBox=false ;
foreach (GridViewRow row in GridView1.Rows)
//for(int row=0;row<gridview1.rows.count;row++)
{
="" checkbox="" cb="((CheckBox)row.FindControl("chk"));
"
="" if="" (cb="" !="null" &&="" cb.checked)
="" if(cb.checked="=true)
" chkbox="true" ;
="" empid="GridView1.DataKeys[row.RowIndex].Value.ToString();
" label1="" .text="" +="string.Format(
" "this="" would="" have="" deleted="" {0}<br="">", EmpId);
}
}
|
|
|
|
|
|
<asp:gridview id="GridView1" runat="server" datakeynames="empid" cellpadding="4" forecolor="#333333" gridlines="None" width="335px">
<columns>
<asp:templatefield>
<headertemplate> <asp:checkbox id="chkall" runat="server">
<itemtemplate>
<asp:checkbox id="chk" runat="server">
<footerstyle backcolor="#5D7B9D" font-bold="True" forecolor="White">
<rowstyle backcolor="#F7F6F3" forecolor="#333333">
<editrowstyle backcolor="#999999">
<selectedrowstyle backcolor="#E2DED6" font-bold="True" forecolor="#333333">
<pagerstyle backcolor="#284775" forecolor="White" horizontalalign="Center">
<headerstyle backcolor="#5D7B9D" font-bold="True" forecolor="White">
<alternatingrowstyle backcolor="White" forecolor="#284775">
|
|
|
|
|
Check Ignore HTML tags in this message (good for code snippets) Check box and paste HTML code
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
hai,
try this one,
CheckBox chkbox = new CheckBox();
foreach(DataGridItem item in gridsearch.Items )
{
chkbox=(CheckBox)item.FindControl("chkbox");
if(chkbox.Checked)
{
//if its true code here//
}
}
Regards
vidya
pain gives gain
|
|
|
|
|
Dear Developers,
I'm importing CSV file to sql DB using ASP.net. It works fine. But ,If a Cell contain a value like john,inc. CSV take it as two values as john and inc
But i want in a single value as john,inc .. How can i do thatThanks in Regards,
Prajin
|
|
|
|
|
For this kind of value you have to use ' or " to enclose the Value
Ex// 1,'john,store',aroda
Best Regards,
Chetan Patel
|
|
|
|
|
Hi Chetan,
This did not work when I read "1,'john,store',aroda" from file and split it on comma to convert to a datatable, "john" and "store" are coming in different columns. I want this in same column.
Regards,
Prajin
|
|
|
|
|
Can u please post the code??
|
|
|
|
|
try
{
memStream = new MemoryStream(fileImport.FileBytes);
reader = new StreamReader((Stream)memStream);
int nCurrPosition = 0;
int nNoOfCharactersToBeRead = Convert.ToInt32(reader.BaseStream.Length) - nCurrPosition;
szRawString = "";
if (nNoOfCharactersToBeRead >= 0)
{
reader.BaseStream.Seek(0, SeekOrigin.Begin);
char[] vBuffer = new char[nNoOfCharactersToBeRead];
reader.Read(vBuffer, 0, nNoOfCharactersToBeRead);
if (vBuffer.Length != 0)
{
szRawString = ReArrangeStringEx(vBuffer);
}
}
if (szRawString != "")
{
szRawString = szRawString.Replace("\r", "");
string[] rows = szRawString.Split("\n".ToCharArray());
for (int j = 0; j < rows.Length; j++)
{
string[] columns = rows[j].Split(',');
if (dtCustomer.Columns.Count == columns.Length)
{
dtCustomer.Rows.Add(columns);
}
}
}
reader.Close();
memStream.Close();
|
|
|
|
|
Well you're not operating on this as a CSV (which would honour the quotes as a text identifier) - you're simply splitting the string using comma:
string[] columns = rows[j].Split(',');
If you want to roll your own code to read from a CSV then you'll need to build something into this line above that honours quotes as a text identifier.
|
|
|
|
|
I suppose u first split your string by ' and then split it by comma. Hope it works.
|
|
|
|