|
sorry sir i forgot to mention that, i am making a website in which a research document can be uploaded and an online plagiarism application/software can check plagiarism with results for e.g(www.plagiarsimdetect.com). Can you please tell me that is there any application with source code or online services which can do that
thanks
|
|
|
|
|
I have an ASP web application. with three asp:dropdownslists. The lists work fine in IE, but when on Firefox (v3.0.7), I can not gain focus on the control with the mouse. I can however tab onto the controls, and use the arrow keys to select focus. I can't get the list to "drop down" even when using the keyboard. Any one have any ideas?
Code For one of the drop downs is......
**********************************************************************************************************************
<asp:dropdownlist id="cmbRaceDates" runat="server" autopostback="True" xmlns:asp="#unknown">
VB Code
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
getRaceDate()
End Sub
Private Sub getRaceDate()
Try
cmbRaceDates.Items.Clear()
cmbRaceDates.Items.Add("Please Select A Race Date")
While Reader.Read
cmbRaceDates.Items.Add(Value To Be Displayed)
End While
cmbRaceDates.Visible = True
Catch ex As Exception
System.Diagnostics.Debug.Write(ex.Message())
Finally
End Try
End If
End Sub
Protected Sub cmbRaceDates_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbRaceDates.SelectedIndexChanged
Do Stuff
end sub
**********************************************************************************************************************
Any Help would be greatly appreciated!
Ryan
|
|
|
|
|
Have you tried removing the autopostback property ? Obviously, ASP.NET is generating HTML that FIrefox doesn't like.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
1) Next time you post a question, post it in proper english. Type 'we' instead of 'v' and someone might help you.
2) Post the portion of code where you are having a problem with
3) Use google to find your answer
To move to the next record, use the .Read method.
SqlDataReader dr = comm.ExecuteReader();
dr.Read();
|
|
|
|
|
I have created a simple gridview in my aspx file and tried to add this gridview to a placeholder in the aspx.cs file, but it does not work. To control the placeholder I am using a sytle sheet. If I create the gridview in the aspx.cs file, then add it to the placeholder it does work. Code snippets are below. All I want to do, is add gridviews to placeholders, which seems simple enough. Any help is appreciated.
Created gridview in aspx file as:
<div id="CssGridView1" runat="server"><asp:PlaceHolder ID="PHGridView1" runat="server"> </asp:PlaceHolder>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
Page load in aspx.cs file:
protected void Page_Load(object sender, EventArgs e)
{
PHGridView1.Controls.Add(GridView1);
}
Stylesheet:
#CssGridView1
{
background: #f9f;
position: absolute;
top: 45px;
left: 0px;
width: 900px;
height: 400px;
border: thin solid #990000 ;
}
|
|
|
|
|
You should be able to do it without any problems.
Are you getting any error?
but if you are dynamically changing the hierarchy of controls on apage they can;t make use of the View State.
Let me know whatz the problem you are facing.
Regards,
Cybernate
|
|
|
|
|
There are no errors, the gridview has the correct data, except the gridview is not is the placeholder, it is where I have positioned the gridview on the form. If I create the gridview in the aspx.cs page, then it works. Thanks
|
|
|
|
|
OK, I'm fairly green with ASP.net and I keep running into the same problem and I've solved it in various ways but none to my satisfaction.
What I want:
- To be able to click on a button/link or choose an option from a dropdownlist and have a tab be updated immediately with data supplied by the event set off by the button/link/dropdown.
What I can do so far:
- First click updates the tab and *then* sets the necessary variables that my tab needs to update properly. A second click re-updates the tab correctly.
So, I use the OnClick event (or similar) of the button to set Session variables (values of which may come from a db) that the tab's OnLoad event needs to load itself properly. Unfortunately, the OnLoad of the tab happens before the OnClick of the button.
Question:
- What is the standard, non-javascript, way of making a C# function happen before the button engages the OnLoad event? Preferably I'd like the OnLoad to only happen once, but if the only way is for the thing to be set off twice, I can live with that.
Alex
|
|
|
|
|
google ASP.NET page life cycle. The on load event will ALWAYS occur before the On click event. Once you understand the cycle better it will help you rearrange your code to fit it to get the desired results
|
|
|
|
|
That's my question: How *do* I rearrange my code to fit the desired result?
Or, is there some AJAXy thing I can do to the button that will allow code to run first and then load a control?
(I should have mentioned that I have looked at the page lifecycle and I still have no idea how to accomplish what I need. My workaround so far has been requiring a selection of an item (datagrid selection, dropdown selection, etc.) and then a button click to confirm the selection.)
Alex
|
|
|
|
|
You had not indicated it was in a ajax call. Typically when an item is not updated in a ajax call even though you attempt to on the server side, the item that does not update isn't in the ajax container that is being updated and therefore doesn't change on the client but the server thinks it has still. A 2nd postback reveals the change.
edit for typo
modified on Wednesday, March 25, 2009 8:58 AM
|
|
|
|
|
Well, in this case, the problem is that I click the button and...
1. The tab, I want updated, gets updated with old information thanks to obsolete session variables and whatnot.
2. The C# code executes - changing the session variables to the values I need (the values being decided by which GridView row the user selected and/or by querying the db).
Result: A tab with old information.
What would I need to do to recover the correct values I need and then update the tab with one click/selection?
Alex
|
|
|
|
|
make sure the tab is part of the ajax update. Make the changes in the onclick event. Is the tab in a update panel that is updated by the button? If not your changes will not be visible until another postback occurs. On sucessful execution of a ajax call, only items in the panel for that update change on the client. The server side viewstate however is updated with all changes. When a 2nd post back occurs, the changes from the viewstate end up showing on the client. I don't know how to be more specific.
|
|
|
|
|
I think I'll be able to figure it out from there - thanks for all the help.
Alex
|
|
|
|
|
I have a collection of 50 textboxes. I was wounding if it is possible to run a TextChange Event on a collection of textboxes instead having to add each event handler in individually.
The code behind is VB
modified on Tuesday, March 24, 2009 12:02 PM
|
|
|
|
|
Hi,
If the text boxes are not dynamic then it is very easy to make that as :
<asp:textbox id="TextBox1" runat="server" ontextchanged="TextBox_TextChanged" autopostback="True" xmlns:asp="#unknown">
<asp:textbox id="TextBox2" runat="server" ontextchanged="TextBox_TextChanged" autopostback="True" xmlns:asp="#unknown">
so on and so forth ....
in code behind
protected void TextBox_TextChanged(object sender, EventArgs e)
{
TextBox txt = ((System.Web.UI.WebControls.TextBox)(sender));
}
you can easily get which textbox changed event is called
Regards,
Milind
|
|
|
|
|
U must have assigned ID to all of ur textboxes whether u create it dynamically or us it beforehand as a static control
so u can create a centralized event handler for all ur textboxes
for eg. if i have two textboxes with their ID as say t1 and t2 respectively then
i will use this method to act as a centralized event handler for textchange d event of both as
void TextBox_TextChanged(object sender,EventArgs e)
{
TextBox t = (TextBox)sender;
switch(t.ID)
{
case "t1": Response.Write("Text Changed in t1");
break;
case "t2": Response.Write("TextChanged in t2");
break;
}
}
|
|
|
|
|
Hi
i am in requirment that,
i have a gridview with data binded. different row has different status.
on mouse hover of the status in the grid, i want to display a some message based on status of the record,
ex: if the rec is at initial stage, on mouse hover it should show all pending status like approval,review,close......
these status should be links. should be able to click on links also.
is it possible to give me some code example......
Would be very thank ful if this is sorted out.
Regards
Naina
|
|
|
|
|
Hi,
There are two ways you can do that.
1. If you are using Ajax Updatepannel then, you can easily get info from site
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HoverMenu/HoverMenu.aspx[^]
2. if it is normal Aspx page with no ajax then, on each rowbound write code for mouse hover attribute
eg.
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand'";
e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';";
}
you can also call javascript on onmouseover attribute.
Regards,
Milind
|
|
|
|
|
Thanks for the reply, i have gone through the URL given by u. but the thing is i want to bind ditterent data for different rows. so how can i do that .
Naina
|
|
|
|
|
Hi,
In that case, you can write a javscript function on onmouseover attribute, and in "Opendiv(para)" javascript method you can pass row index and show the appropriate data in DIV control.
protected void gridview_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onmouseover"] = "javascript:OpenDiv(" + e.Row.RowIndex + ");";
e.Row.Attributes["onmouseout"] = "javascript:CloseDiv();";
}
}
Regards,
Milind
|
|
|
|
|
I am getting this error
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for niwant_gadgil@yahoo.co.in
Following is the code which i have written :
////////////////////////////////////////////////////////////////
protected void btnSubmit_Click(object sender, EventArgs e)
{
if (tbUsrName.Text == "")
{
Response.Write("<script language='javascript'>alert(\"UserName is Blank...\");</script>");
}
else
{
try
{
string dbString = ConfigurationManager.ConnectionStrings["AppCon"].ConnectionString;
SqlConnection sqlcon = new SqlConnection(dbString);
sqlcon.Open();
SqlCommand sc = new SqlCommand("select usr_Email from usr_details where usr_ID = '" + tbUsrName.Text.ToString() + "'", sqlcon);
SqlDataReader sqldr = sc.ExecuteReader();
if (sqldr.Read())
{
string e_mail = sqldr["usr_Email"].ToString();
MailMessage msg = new MailMessage("noreplyadmin@learners21st.com", e_mail, "Password Recovery", "ur new password is 0a1b2c3d plz change it as soon as u log in");
SmtpClient mySmtp = new SmtpClient("localhost");
mySmtp.Send(msg);
lblResult.Visible = true;
lblResult.Text = "Submit occured";
}
else
{
lblResult.Text = "No Such User Found........";
lblResult.Visible = true;
}
}
catch (Exception ex)
{
lblResult.Visible = true;
lblResult.Text = ex.Message;
}
}
}
NOTE : noreplyadmin@learners21st.com doesn't exist
NOTE : I am not using ASPNETDB
///////////////////////////////////////////////////////////
In web.config i hve included this section to post the mail
<system.net>
<mailSettings>
<smtp>
<network host="localhost" port="25" defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
How can i solve this plz help
|
|
|
|
|
pls put the host the local ip address like 192.168.0.54 instead of localhost and then try
|
|
|
|
|
I have developed an website for forums
i want to that users who has replied to a question are also able to delete their replies
how can I achieve that plz help!!!
|
|
|
|