|
we cannot do your work. r u a student or the programmer.
Do you there is our best friend. try to get the answer from him and leran the concet from the book. these are all very simple.
SSK.
|
|
|
|
|
i didn't understand what you want
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 developing a c# based web application. I incorporated a radgrid on to my user form, and filled it programmatically.
However i get an indexoutofrangeexception whenever i click to move on to the next page.
Below is the code that i ham using to bound items.
//CODE STARTS
<code>protected void rgCases_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
{
int index = e.Item.ItemIndex + (rgCases.PageSize * rgCases.CurrentPageIndex);
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
lnkBtn = new LinkButton();
lnkBtn.ID = "LinkButton1";
lnkBtn.Text = "<a href='./CasesDetail.aspx?idCase=" + ds.Tables[0].Rows[index][0].ToString() + "'>" + ds.Tables[0].Rows[index][4].ToString() + "</a>";
item["idcase"].Controls.Add(lnkBtn);
}
} </code>
//CODE ENDS
The exception arises in the line
<code>lnkBtn.Text = "<a href='./CasesDetail.aspx?idCase=" + ds.Tables[0].Rows[index][0].ToString() + "'>" + ds.Tables[0].Rows[index][4].ToString() + "</a>"; </code>
The exception detail is as follows
There is no row at position 5.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:
System.IndexOutOfRangeException: There is no row at position 5.
Source Error:
<code>
Line 299: lnkBtn.ID = "LinkButton1";
Line 300:
Line 301: lnkBtn.Text = "<a href='./CasesDetail.aspx?idCase=" + ds.Tables[0].Rows[index][0].ToString() + "'>" + ds.Tables[0].Rows[index][4].ToString() + "</a>";
Line 302: item["idcase"].Controls.Add(lnkBtn);
Line 303: }
</code>
MY page size is 5 as well.
cana nyone please help, if not on how to remove on a TELErIK RAdgrid, atleast tell me, how i can remove on a Grid
thanks,
Kunal
|
|
|
|
|
kunal_gct wrote: There is no row at position 5.
Thanks to Dotnet Exception is clearly mentioning why it is occuring.
Try to debug the application see the content of datset
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 sandeep
I wrote this code now,
<br />
HyperLink link = (HyperLink)item["idcase"].Controls[0];<br />
((LinkButton)(item["idcase"].Controls[0])).Text = item["keycase"].Text;<br />
((LinkButton)(item["idcase"].Controls[0])).ResolveUrl("./CasesDetail.aspx?idCase=" + item["idcase"].Text);<br />
But now i get another exception. this time an argumentoutofrangeexception.
this is the line
Line 344: ((LinkButton)(item["idcase"].Controls[0])).Text = item["keycase"].Text;
please advise
|
|
|
|
|
Hi all,
I need to set the dropdownlist's selectedvalue in to other dropdownlist present in other form. how to do it?
|
|
|
|
|
Pass that value into other form using query string.
In other form.write code to set value
string param=Request.Querystring["val"];<br />
ddl.SelectedValue=param;
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
What do you want? Other form on the same page or a form on other page?
Naresh Patel
|
|
|
|
|
I need the first tab to display a default aspx form in my solution. I am using Master pages and content pages. The aspx form is a content page.
Does anyone have a solution or even wording to Google for an answer? I haven't been able to find anything on Google yet as I'm probably not wording it correctly?
Thank you.
|
|
|
|
|
Hi all,
I have a form with a button and a textbox. When i click button, linkbutton will be create on form.
When i click linkbutton, "Hello" will be filled into textbox.
protected void Button1_Click(object sender, EventArgs e)
{
LinkButton lbtn = new LinkButton();
lbtn.ID = "MyLinkButton";
lbtn.Text = "Welcome";
lbtn.Command += new CommandEventHandler(lbtn_Command);
form.Controls.Add(lbtn);
}
protected void lbtn_Command(object sender, CommandEventArgs e)
{
txt.Text = "Hello";
}
But when i click LinkButton, Command event is not raised.
What can i do to raise Command event of LinkButton?
|
|
|
|
|
Problem is when u click on Button then LinkButton will be created and added in the form.But when u click on the Linkbutton at that time u can not create linkbutton againg.You have to create every postback.
try to create it on Page_Load event
try this code.
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
CreateBtn();<br />
}<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
CreateBtn();<br />
}<br />
public void CreateBtn()<br />
{<br />
LinkButton lnk= new LinkButton();<br />
lnk.ID = "MyLinkButton";<br />
lnk.Text = "Welcome";<br />
lnk.Click += new EventHandler(lnk_Click);<br />
form.Controls.Add(lnk);<br />
}<br />
public void lnk_Click(object sender, EventArgs e)<br />
{<br />
txt.Text = "Hello"; <br />
}
Best Regard
Pathan
---------------------------------------------------
|
|
|
|
|
I have a master page with 2 divs a LeftColumn and MainColumn. My menu control is in the LeftColumn, the static menu is the same size as the left column so my dynamic menu pops out over the main column. My problem is when the dynamic menu pops out it is behind the content in my MainColumn. How can I get this to come out in front? I know the answer is right in front of me but I seem to be missing it. Any help would be most appreciated.
|
|
|
|
|
set z-index to a higher value so it will be visible
|
|
|
|
|
Hi guys,
You may have seen Ajax Textboxwatermarket effect. I am using that but the problem with this is anytime I try to enter anything on the textfield or textbox the width of the textbox gets slightly bigger, it doesn't stay what i have explicitly defin while coding my textbox. I even set the width in the CSS but still no result.
You may also see live on www.asp.net website and check this control. I would appreciate if anyone can help.
Thanks
|
|
|
|
|
while using java script popups to give a confirmation alert the background screen is getting blank how to achieve this popup without effecting the background screen
entry level s/w professional
|
|
|
|
|
I have a dropdown list.
It has following items
admin@sam.ca.gov Admin Miller
bobby@sam.ca.gov Bobby Gill
chris@sam.ca.gov chris Ghai
jim@sam.ca.gov Jim Ghotra
Here each item represent email address and his first name and last name. I need to select an item from drop down list and grab only email ID when I click on a button.
The domain of email is always same. i.e @sam.ca.gov is always same for all users.
Thanks in advance
seema
|
|
|
|
|
you can use a new string to copy the dropdown list item value/text and then u can use string operations to get the email id use the empty space as the escape sequence to get the string(i.e. email id)
entry level s/w professional
|
|
|
|
|
could you please send me the code
seema
|
|
|
|
|
Hi you can set value property of the dropdownlist to the first name or last name whatever you want.
like
dropdownlist1.Text="admin@sam.ca.gov Admin Miller";
dropdownlist1.Value="Admin Miller";
Naresh Patel
|
|
|
|
|
Hi there,
I'm trying to create bar-graphs that track a students progress a series of tests. Nothing fancy, just bar graphs for 5 different subjects. Y-Axis to contain marks and X-axis date on which the tests were taken. The results will be stored on an SQL database.They may/may not post a link to the graphs on their blog so that when the page loads, the graph should show up.
Any idea which product can do this for me? I had a look at Dundas and .netcharting but both have far more features than i need. Not to mention they waaaay too expensive I just want to display the graph subject wise or all subjects on the page a la Google analytics.
Any suggestions?
|
|
|
|
|
Hello Everyone,
I'm sending mail through ASP.NET and it's rocking. But whenever i'm trying to send the text given below then an error is occuring.
"Some formatted text like bold italic and etc"
Actually i'm creating my own emailEditor through which i can bold,italic and etc. facilities being provided.
And it's working great but as i'm sending normal text it's but as i provide some formatted text it's not..................
The code i'm giving below for sending mail.........
//For Sending The Mail
MailMessage mail1=new MailMessage();
mail1.To="mail@saamstesting.com";
//mail1.From="info@kiritbhaiji.com";
mail1.From="manoj.manojbisht@gmail.com";
mail1.Subject="Mail From Manoj Bisht";
mail1.Priority=MailPriority.High;
mail1.BodyFormat=MailFormat.Html;
string body=HtmlTextArea.Value;
mail1.Body=body.ToString();
try
{
SmtpMail.SmtpServer="127.0.0.1";
SmtpMail.Send(mail1);
lblMsg.Text="Mail Sent Successfully";
lblMsg.ForeColor=Color.DarkBlue;
}
catch(Exception ex)
{
lblMsg.Text=ex.Message.ToString();
lblMsg.ForeColor=Color.Red;
}
And the following error occuring
A potentially dangerous Request.Form value was detected from the client (HtmlTextArea="Manoj Bis...").
-- modified at 11:49 Tuesday 11th September, 2007
|
|
|
|
|
I think you need to turn the event validation on the form off.
I didn't get any requirements for the signature
|
|
|
|
|
Hi Guru's
Im using ObjectDataSource for filling up the GridView, I'm just moving in on using objectDataSource, I find it handy since it trims up my code. After placing the requirement I'm encountering this issue No parameterless constructor defined for this object.
Please let me know what when wrong?
Regards
Dom
|
|
|
|
|
The class doesn't have a zero parameter constructor. Some object that you are using requires a zero parameter constructor (even if it doesn't use it).
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Here's the deal. Any serializable object must have a parameterless constuctor. For the Object Oriented beginner that means.
Class MyDataOject
{
public MyDataOject()
{
//parameterless consturctor
}
}
This is so that the object can be serialized to XML. Also you can not not have read only properties for the same reason. If a property is read only you can't recreate the object from xml. The objectDataSource probably serializes your class behind the scenes.
I didn't get any requirements for the signature
|
|
|
|