|
Hi,
I am trying to post back the page after a button with an updateprogress executes.
The basic layout of the page is this:
1. User control at the top of the page, with no update panel
2. Update panel at the bottom of the page, with a Save button.
When the user clicks save, I want the updateprogress to display while it's processing (working as desired)
However, after saving, I need to do a postback because the save button tries to change some display properties of the user control at the top... but does not do so without a postback.
For various reasons, I could not simply place the user control inside the update panel. To make the long story short, I'm working with an ASP 1.1 site which was just recently compiled in ASP 3.5. There is a high-effort required to make this user control to work, when placed in an update panel.
Thank you for your help!
Rafferty
|
|
|
|
|
I am using the Role manager provided with Visual Studio. I do not know much about it.. I know how to unlock accounts, and do simple user interactions, but what I was wanting to know if there was a way to take that database and integrate it into another database?
Right now my web applicatino contains a database for all of its data, and a database for all the user login data. Is there a way to combine these two? Do I just replicate all the stored procedures, tables, and views from the membership database to my database?
|
|
|
|
|
aspnet_regiis.exe[^]
The above link will walk you through creating the required tables, views, and stored procs.
In your case, just select the web applications current database.
Hope this helps.
Robert Fidler
Springfield, Missouri
I'm listening but I only speak GEEK.
|
|
|
|
|
Ok I was afraid that might do something to my current tables... what about transferring the data in the database I use now to the new on I embed in my own database?
|
|
|
|
|
Using SQL Server Managment Studio import the database from old tables to new tables.
This should be quick and painless process.
Hope this gets you rolln'
Robert Fidler
I'm listening but I only speak GEEK.
|
|
|
|
|
I have a simple app that has several ComboBoxes. I should be able to change the ComboBox1 selection even after I have changed ComboBox3 (or ComboBox4, should the user change his/her mind). But my ComboBox1, even after changing, when tabbed out of, reverts to the earlier selection.
As a start, cboEvents.SelectedIndex = 3.
I then move to cboTime and select a certain value there (in cboTime).
I then return to cboEvents and change the SelectedIndex to 9.
But when I tab out of cboEvents, it reverts to SelectedIndex = 3 (the original selection).
Can someone show me how to discard the old selection and save the new selection?
PS. I have to mention that cboTime is dependant on cboEvent selection (the code that populates cboTime is based on the SelectedIndex of cboEvents).
Thanks!
|
|
|
|
|
When you change the selection of combo box, the page gets a post back and your combo box is again assigned the old value it had earlier.
You need to decide, weather you want to use the AutoPostBack property of the combobox or check the IsPostPack property of the page while assigning the value to combobox.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
One column on my gridview is an asp commandfield. When a user clicks on a row in this column how can I execute a client side java script function instead of the code behind function?
|
|
|
|
|
Convert your commandfield column as templatefield then replace the item template control by regular html link tag.
|
|
|
|
|
<title>GridView Data Manipulation
function ConfirmOnDelete(item)
{
if (confirm("Are you sure to delete: " + item + "?")==true)
return true;
else
return false;
}
<columns>
<asp:boundfield datafield="CustomerID" headertext="ID" readonly="true">
<asp:boundfield datafield="CompanyName" headertext="Company">
<asp:boundfield datafield="ContactName" headertext="Name">
<asp:boundfield datafield="ContactTitle" headertext="Title">
<asp:boundfield datafield="Address" headertext="Address">
<asp:boundfield datafield="Country" headertext="Country">
<asp:commandfield showdeletebutton="True" showeditbutton="True">
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowState != DataControlRowState.Edit) // check for RowState
{
if (e.Row.RowType == DataControlRowType.DataRow) //check for RowType
{
string id = e.Row.Cells[0].Text; // Get the id to be deleted
LinkButton lb = (LinkButton)e.Row.Cells[6].Controls[2]; //cast the ShowDeleteButton link to linkbutton
if (lb != null)
{
lb.Attributes.Add("onclick", "return ConfirmOnDelete('" + id + "');"); //attach the JavaScript function with the ID as the paramter
}
}
}
}
|
|
|
|
|
Dear fellows. I'm doing a small asp.net application to send an email using the System.Web.Mail namespace and gives me the "The transport failed to connect to the server" when I'm running it, please help.
ML Lingwati
|
|
|
|
|
check the credentials and mail server.
you use smtp service?
some like this:
public static void sendMail(string _to, string _subject, string _body)
{
MailMessage correo = new MailMessage();
correo.From = new MailAddress(_emailFrom);
correo.To.Add(_to);
correo.Subject = _subject;
correo.Body = _body;
correo.IsBodyHtml = false;
correo.Priority = MailPriority.Normal;
SmtpClient smtp = new SmtpClient();
smtp.Host = _server;
smtp.Credentials = new NetworkCredential(_user, _pwd);
try
{
smtp.Send(correo);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "TestOfApplication",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
regards
|
|
|
|
|
LucBite wrote: System.Web.Mail
Why not System.Net.Mail[^]
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi,
Im have addressed some of the problems such as the attachEvent only supported in IE, but im having problems loading the image as the user draws i.e. it only updates the image once the mousemove event has finished.
[^]
Cheers
|
|
|
|
|
FireFox does not support javascript.
|
|
|
|
|
How to show the designer generated hidden code in VS 2005 (initializeccomponent..onload..oninit..etc)
it's not cool to work while having code lines hidden
thanks guyz
|
|
|
|
|
bolly-81 wrote: it's not cool to work while having code lines hidden
Whats cool thn?
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I have add check box in a gridview in eachh row at run time.I have a delete button on page.If it is clicked then all checkbox are checed if true yhen delete corresponding row.I have use Template column for checkbox.and bind an id with it.On running page this id is also visible but i want to do invisible it.also how can i retrieve this id if checkbox is checked.
here is code...
protected void Page_Load(object sender, EventArgs e)
{
query="select brok.*,cust.FirstName+' '+cust.LastName as Name from brokermsgrecieved as brok,custdetails as cust where brok.BrokerId='"+Session["broker"]+"' and cust.CustId=brok.FromCustId";
dt = obj.select(query);
GridView1.DataSource=dt;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
CheckBox chk = new CheckBox();
e.Row.Cells[0].Controls.Add(chk);
if (e.Row.Cells[1].Text == "True")
{
e.Row.BackColor = Color.Wheat;
}
if (e.Row.Cells[1].Text == "False")
{
e.Row.BackColor = Color.WhiteSmoke;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
GridView1.DataSource = dt;
GridView1.DataBind();
Int16 count =(Int16) GridView1.Rows.Count;
for (Int16 i = 1; i < count; i++)
{
CheckBox chk = (CheckBox)GridView1.Rows[i].Cells[0].Controls[1];
if (chk.Checked.Equals(true))
{
//query="Delete from brokermsgrecieved where "
//GridView1.Rows[i].Cells[0].v
query = "delete from brokermsgrecieved where MsgId='1'";
obj.insert(query);
}
}
}
here is code such that i bind id----
<asp:gridview id="GridView1" runat="server" autogeneratecolumns="False"
="" width="611px" onrowdatabound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<%# Eval("MsgID") %>
</ItemTemplate>
</asp:TemplateField>
|
|
|
|
|
use the HTML name attributre as place holder for other value.
<br />
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)<br />
{<br />
CheckBox chk = new CheckBox();<br />
chk.Attributes.Add("name", e.Row.Cells[100].Text);
e.Row.Cells[0].Controls.Add(chk);<br />
<br />
}<br />
<br />
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
Int16 count = (Int16)GridView1.Rows.Count;<br />
for (Int16 i = 1; i < count; i++)<br />
{<br />
CheckBox chk = (CheckBox)GridView1.Rows[i].Cells[0].Controls[1];<br />
string id = CheckBox3.Attributes["name"];<br />
}<br />
}<br />
happy coding..
|
|
|
|
|
|
I have a class that inherits from CompositeControl that dynamically creates controls at runtime (typically 2-5 DropDownList controls). All of the control creation is happening in CreateChildControls().
When a page using that control first loads everything is correct. However, after the selected index is not being remembered. It doesn't matter what is selected in the DropDownList controls, SeletedItem or SelectedValue is always the first item in the control.
I then found some posting that said AutoPostBack needs to be set on the DropDownList Controls and that a check for IsPostBack needed to be put in CreateChildControls(). I did that but when a new item in any of the DropDownList controls was selected, all of the DropDownList controls were empty.
I then saw something that said for the ViewState to be preserved, the DropDownList control must first be added (i.e. Controls.Add()) and then load the control. That didn't help either.
Has anyone done anything like this before? Any guidance and how to get this thing to work?
Thanks!
|
|
|
|
|
i have dropdownlist1,dropdownlist2,textbox1,button1,button2,dropdownlist3
here i am selecting an item from each dropdownlist, perform concatinating and i showed in textbox fine.
but when i want to enlarge concatination means the selected item text will be overridden on the previous selecteditem text
i want to prevent this..
finally i want the TextBox2 output as follows;
exa:
(ddl1) (ddl2) (txt1) (btn1) (ddl) (ddl2) (txt1) (ddl3)
Month_no = 5 and Quarter_no = 3 group by(abc)
means
month_no = 5 and quater_no = 3 group by(abc)
how to get this one.........
help me out...
Regards,
Koti
|
|
|
|
|
You asked the similar question yesterday here[^]
katarukoti wrote: exa:
(ddl1) (ddl2) (txt1) (btn1) (ddl) (ddl2) (txt1) (ddl3)
What the %$%# is this???
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
The answer is correct somehow ie if i change any dropdownlist value it is override the corresponding value bec i wrote common funcatio like
textbox2.Text=ddl.selecteditem.text+ddl2.selecteditem.text+-----------
how to avoid overriding let me know......
Regards,
Koti.K
|
|
|
|
|
use the string format
Month_no = string.Format("{0} {1} {2} {3} {4} {5} {6} ({7})", (ddl1),(ddl2),(txt1) (btn1),(ddl),(ddl2),(txt1),(ddl3));
happy coding...
|
|
|
|