|
Its not possible to change the style of javascript confirm box.Either you can make your own custom usercontrol for that or can use vbscript for this but this will work only in IE. Go through the link
Cheers!!
Brij
|
|
|
|
|
You can use Asp.Net Ajax Modal popup or any other model popup control
for your purpose.
Unfortunately, with javascript confirm you cannot achieve
"Yes" and "No" instead of "Ok" and "Cancel".
|
|
|
|
|
ok thanks for the information...
|
|
|
|
|
hi friends
i need to create the cookie in domain name..
For example:
my cookie file named as "administrator@localhost.txt"
but i need to create "administrator@mydomainname.txt"
i tried like this
Dim objcookies As HttpCookie = New HttpCookie("SalesLogin")
objcookies.Domain="www.mydomain.com"
but it is not created...
can any one help me?
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
Following is way to create cookie in asp.net
1.HttpCookie objCookie = new HttpCookie(cookiename);
2.Response.Cookies.Add(objCookie);
3.objCookie.Values.Add(cookiename,cookievalue);
i think you forget second line of the code which add cookie to respose
|
|
|
|
|
thanks for reply
Dim objcookies As HttpCookie = New HttpCookie("SalesLogin")
objcookies.Domain = Request.ServerVariables("HTTP_HOST")
objcookies.Secure = True
objcookies.Values.Add("AdminType", Session("AdminType"))
objcookies.Values.Add("AdminId", Session("AdminId"))
objcookies.Expires = DateTime.Now.AddDays(1)
Response.Cookies.Add(objcookies)
thisis my code
Known Is Drop.Unknown Is Ocean
|
|
|
|
|
|
|
In the classcal SOA system, there are several documents transmit ways,
such as once-and-only-once delivery),at-most-once delivery,duplicate message elimination,guaranteed message delivery
How to achieve these ways in the mission-critical systems?
Does any one can help me?
|
|
|
|
|
hi guys,
I have 13 classes like clsSales, clsOrder, clsInvoice, clsEmail, clsTimesheet, etc..... every class has obviously different fields and
properties. But there is one class like Sales which have all fields and properties which other classes have.
Now there are 2 options
first one I should create all classes seperately like
clsSales
saleid, orderid, orderdate, invoiceid, invoicedate, emailid, emaildate, timesheetid, timesheetdate.
clsOrder
orderid, orderdate
clsInvoice
invoiceid, invoicedate
clsEmail
emailid, emaildate
and the second option is I should inherit all classes from clsSales class.
My question is if I Implement 2nd option will this improve or make worse web page performance.
thanks
kind regards,
learner
|
|
|
|
|
Learner520 wrote: My question is if I Implement 2nd option will this improve or make worse web page performance.
You won't get any performance problems. Readability, maintainability and choice of design is all matters here. Also inheriting all the classes from sales just to get the common fields is not a good idea. How about a design like,
Order
orderid, orderdate
Invoice
invoiceid, invoicedate
Email
emailid, emaildate
Sales
saleid, Order, Invoice, Email, timesheetid, timesheetdate. Sales class contains references to related classes. So to get an order id from a sales object, you could write salesObject.Order.orderid . You are not repeating any properties here.
BTW, I don't prefix cls to my classes.
Best wishes,
Navaneeth
|
|
|
|
|
Hi...
I have used Adrotator in master page and put it alongwith timer control inside update panel.
In one of my content page I also used update panel and put dropdownlist inside it.
when I browse this content page, and click dropdown list, list appears but as soon as the image of adrotator which is in master page changes , dropdown list gets previous state.
why update panel or timer control of master page affect the content page update panel ?
thanks,,
By:
Hemant Thaker
|
|
|
|
|
set the content page update panel's updatemode as conditional as
UpdateMode="Conditional"
it is by default Always
Update this update panel from serverside code as per your requirement using the code
UpdatePanel1.Update();
If you wont set the updatemode then bydefault evry updatepanel gets updated on any partial/full postback
Let me know if you have any query.
Cheers!!
Brij
|
|
|
|
|
fantastic,,, its working..
thanks for the help,
By:
Hemant Thaker
|
|
|
|
|
Your welcome
Cheers!!
Brij
|
|
|
|
|
Hello!
sorry if this has been asked before, couldn't find anything.
I've a gridview populated with data from database.
I want to allow user to click on a column, send the action to the server which will recognize the column selected.
The only actions I can see send the row which was clicked on, and not the column.
For exampel this action:
protected void MainGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
string s = ((DataRowView)e.Row.DataItem).ToString();
}
Thanks for help!
|
|
|
|
|
I know this is not the perfect solution, but you can apply this until you find another one.
Enable Sorting on the gridview and then handle the Sorting event.
inside that you will get a e.SortExpression . which is the Column name you clicked on.
Now call some method by passing it as parameter and return; .
I am not sure but most probably this will work.
|
|
|
|
|
thanks for the quick reply
that seems to be a good approach. I tried implement it but it doesn't invoke the action when i click on the grid.
have i forgot something? (I enabled sorting)
|
|
|
|
|
all you have to do is, AllowSorting = "true" and then handle the "Sorting" event (OnSorting="GridView1_Sorting"). and then click on the column names (it should be appeared as links) at the run time.
|
|
|
|
|
|
I'm using OWC 11.0 in ASP.NET and C# to create excel file.
I need to protect/unprotect the sheet by a password. I tried to protect the sheet by following code.
string Password = "Password123";
object getPasswordFromUser =(object)Password;
xl.ActiveSheet.Protect(ref getPasswordFromUser, ref obj,
ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj,
ref obj, ref obj, ref obj, ref obj, ref objTrue, ref obj);
But it throws an exception "Exception from HRESULT: 0xE0040059"
Kindly help me to resolve this issue. Code works well if I miss the password.
|
|
|
|
|
Hi All
I am using paging in grid view
<br />
<asp:GridView ID="gridOrganizationDetails" runat="server" <br />
AutoGenerateColumns ="false" OnRowEditing ="gridOrganizationDetails_RowEditing"<br />
OnRowDeleting ="gridOrganizationDetails_RowDeleting" CellPadding="7" <br />
onrowcreated="gridOrganizationDetails_RowCreated" AllowPaging="True" <br />
PageSize="1"><br />
<RowStyle ForeColor="#000066" /><br />
<FooterStyle BackColor="White" ForeColor="#000066" /><br />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /><br />
<PagerSettings Mode="NextPrevious" /><br />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /><br />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" /><br />
<AlternatingRowStyle BackColor="#ffffff" /><br />
<AlternatingRowStyle BackColor="#ffffff" /><br />
<Columns><br />
<asp:BoundField HeaderText="Id" Visible ="true" DataField ="pk" /> <br />
<asp:BoundField HeaderText="Organization Name" Visible ="true" DataField ="name" /> <br />
<asp:BoundField HeaderText="Address 1" Visible ="true" DataField ="address1" /> <br />
<asp:TemplateField HeaderText="Active"><br />
<ItemTemplate><%# DisplayActive((Byte)Eval("is_Active"))%></ItemTemplate><br />
</asp:TemplateField> <br />
<asp:CommandField ShowEditButton ="true" HeaderText ="Edit" <br />
HeaderStyle-HorizontalAlign ="Center" ItemStyle-HorizontalAlign ="Center" ><br />
<HeaderStyle HorizontalAlign="Center"></HeaderStyle><br />
<br />
<ItemStyle HorizontalAlign="Center"></ItemStyle><br />
</asp:CommandField><br />
</Columns><br />
</asp:GridView><br />
in this i am following 3 tier architecture from Page i m calling business logic
from UI
<br />
DataSet ds = myAction.GetOrganizationDetailsPaging(roleId, userId);<br />
<br />
gridOrganizationDetails.DataSource = ds;<br />
gridOrganizationDetails.DataBind();<br />
in second layer
if (roleId == Convert.ToInt32(UserRole.Admin))
{
query = "Select * from organization";
}
else
{
query = "select * from organization orga , user us where (orga.pk =us.org_fk) and us.role_fk ='" + roleId + "'" + "and (us.pk ='" + userId + "')";
}
DbAction dbConnector = new DbAction();
DataSet ds = new DataSet();
ds = dbConnector.ExecuteDataSet(query);
return ds;
from 3 layer i am returning the following thing
public DataSet ExecuteDataSet(String query)
{
DataSet ds = new DataSet();
MySqlDataAdapter adapter = new MySqlDataAdapter(query, ConfigurationManager.ConnectionStrings["ConnectionString"].ToString());
adapter.Fill(ds);
return ds;
}
if i m defiing page size 2 then only 2 record is coing and no paging option is coming
i am using My sql
thanks and regars
amit
|
|
|
|
|
According to me if paging option is not coming than only 2 record is returned form the database try to run query in query analyzer and see the result
if not than plz try to provide more info
|
|
|
|
|
Because you forgot to handle PageIndexChanging event of Grid View.
On that event you need to assign new page index to the gridview and then you need to bind the data set again.
i.e.
protected void gridOrganizationDetails_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gridOrganizationDetails.PageIndex = e.NewPageIndex;
ds =
gridOrganizationDetails.DataSource = ds;
gridOrganizationDetails.DataBind();
}
|
|
|
|
|
i checked from data base 10 record is coming.
and i also handle page index changing event
but still that footer is with record not coming.
|
|
|
|