|
|
Hi,
if you have an ASP.NET button you can register for the click-event of the button. Within the event handler use Response.Redirect to navigate to the other page.
|
|
|
|
|
if the application is xbap application which has been published and has its url . Can it be done the same way . If not then how?
|
|
|
|
|
So is the calling app an xbap app or the is it the page you want to navigate to?
If you want to navigate to an xbap app it should work without problems (only in IE). If you want to do this in an xbap app you should post the question in the XAML/WPF forum, maybe someone would know this over there.
|
|
|
|
|
This [^]link explains quite a few methods to do this.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Im using this code to get and display FullNAme from Active Directory.
It works fine on my machine but when i upload it on the Server It give me following error
I try to change winNT into LDAP but no use on SERVER...
////////////
Error: System.Runtime.InteropServices.COMException (0x80072020): An operations error occurred. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at _Default.GetFullName(String strLogin) in d:\inetpub\En.ASPETAR.Rel\QCD-Suggestions\Default.aspx.cs:line 60
//////////
protected void Page_Load(object sender, EventArgs e)
{
this.lblDOS.Text = DateTime.Now.ToShortDateString();
tbName.Text = GetFullName(Request.ServerVariables["LOGON_USER"].ToString());
}
private string GetFullName(string strLogin)
{
string str = "";
// Parse the string to check if domain name is present.
int idx = strLogin.IndexOf('\\');
if (idx == -1)
{
idx = strLogin.IndexOf('@');
}
string strDomain;
string strName;
if (idx != -1)
{
strDomain = strLogin.Substring(0, idx);
strName = strLogin.Substring(idx + 1);
}
else
{
strDomain = "MYDOMAIN NAME";
strName = strLogin;
}
DirectoryEntry obDirEntry = null;
try
{
obDirEntry = new DirectoryEntry("WinNT://" + strDomain + "/"+ strName);
System.DirectoryServices.PropertyCollection coll = obDirEntry.Properties;
object obVal = coll["FullName"].Value;
str = obVal.ToString();
return str;
}
catch (Exception ex)
{
str = "";
return "Error: " + ex;
}
}
sheeba
|
|
|
|
|
What exception are you getting ?
And how does it related with ASP.NET ?
|
|
|
|
|
Error: System.Runtime.InteropServices.COMException (0x80072020): An operations error occurred. at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) at System.DirectoryServices.DirectoryEntry.Bind() at System.DirectoryServices.DirectoryEntry.get_AdsObject() at System.DirectoryServices.PropertyValueCollection.PopulateList() at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName) at System.DirectoryServices.PropertyCollection.get_Item(String propertyName) at _Default.GetFullName(String strLogin) in d:\inetpub\En.ASPETAR.Rel\QCD-Suggestions\Default.aspx.cs:line 60
sheeba
|
|
|
|
|
This is the Stack Trace. There should be an error message
|
|
|
|
|
i want to create a floating form in my web forms.
a floating form with out windows frame and with close button and it should be movable... im looking for javascript code that use it in asp.net...
help me please...
thanks
M.Alizadeh
|
|
|
|
|
If it doesn't have a frame, javascript can't help. You'd be creating a floating div.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
tel me please how i can use a floating div...
i dont know about this
M.Alizadeh
|
|
|
|
|
|
I need to perform a custom paging like
"First" "2" "3" "Last"
but not able to do it
my grid is binding on a button click.
pls help
|
|
|
|
|
I don't believe the gridview suports that, you'd have to write your own paging control.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i know that gridview doesnt support
custome paging
thats why i was asking for some waythrough it .
|
|
|
|
|
Hello Friends,
I'm implementing custom paging in my GridView. Paging numbering(in-built paging numbering) does not display but it brings the records are queried . Below giving my code please let me know what changes i should make in my code. But if i use in-built paging(normal paging) then that's working fine......
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
lblMsg.Text = e.NewPageIndex.ToString();
int pageNumber=Convert.ToInt32(e.NewPageIndex);
int recordPerPage= 4;
int startRecord = (pageNumber) * recordPerPage + 1;
int maxRecord = startRecord + recordPerPage;
bindGridView1(startRecord,maxRecord);
}
public void bindGridView1(int startRecord,int maxRecord)
{
string connectionString = "server=.;database=Auto_New;uid=sa;pwd=;";
using(SqlConnection mCon = new SqlConnection(connectionString))
{
SqlCommand mDataCom = new SqlCommand();
mDataCom.Connection = mCon;
mDataCom.CommandType = CommandType.StoredProcedure;
mDataCom.CommandText = "SP_Select1";
mDataCom.Parameters.AddWithValue("@startRecord", startRecord);
mDataCom.Parameters.AddWithValue("@maxRecord", maxRecord);
SqlDataAdapter da = new SqlDataAdapter(mDataCom);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
}
}
|
|
|
|
|
Hi All,
I have a table with headers as below, table displyed with a horizontal and vertical scroll bars within DIV tag. When it is displayed in IE browser headers width is normal but when they are displayed in Mozilla or Safari browsers they are displayed with reduced column widths when compared with its items below.
I found the reason for this is below code(overflow: ovfl), but when I put the overflow: auto here the header widths are proper but when we scroll vertical bar headers are going inside of the DIV tag.
if(DIV_Array.clientHeight>290){$(TAB_Array).fixedHeader({width: 900,height: h, overflow: ovfl});}
Can anybody give me advice to make the headers fixed and their widths are also fixed according to the width of columns.
Thanks in advance.
This is the table header part
<th class="RowHeader2Cell1" align="left" style="white-space:nowrap;width:20%;">Asset Name</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">CUSIP</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">ISIN</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">SEDOL</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Ticker</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Current Allocation</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Quantity</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Current Price</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Date Priced</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Market Value</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Total Cost</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Unrealized Gain/Loss</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Estimated Annual Income</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Yield</th>
<th class="RowHeader2" align="right" style="white-space:nowrap;width:20%;">Portfolio</th>
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Hi dear try this...
How to Freeze GridView Header While Scrolling ?
This is very common problem in Web development that we need to freeze the GridView header at the time of scrolling, Here is one simple tips:
Step 1 : Create a CSS class as following
view plaincopy to clipboardprint?
1. .HeaderFreez
2. {
3. position:relative ;
4. top:expression(this.offsetParent.scrollTop);
5. z-index: 10;
6. }
Step 2 Set Gridview’s HeaderStyle CssClass as follows
CssClass="HeaderFreez"
That’s all. Some times we need also maintain the scroll positions while selecting any data from GridView, and quite difficult to maintain the position while we are using AJAX, I have written a complete article on that, hope this will help Maintain GridView Scroll Position inside updatepanel
|
|
|
|
|
Hi,
I am not using gridview instead I am using table here. Still can I use the same CSS for my purpose also.
Thanks,
Md Abdul Aleem.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Hi dear try this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: bold;
}
.style3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; color: #FF0000; }
.HeaderFreez
{
position:relative ;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}
-->
</style>
</head>
<body>
<p>
<div style="height:100px;width:200; overflow: scroll;">
<table width="200" border="1" cellspacing="0" cellpadding="0">
<tr class="HeaderFreez" bgcolor="#000000" >
<td class="style1"><span class="style3">Number</span></td>
<td class="style1"><span class="style3">Text</span></td>
<td class="style1"><span class="style3">Other</span></td>
</tr>
<tr>
<td>1</td>
<td>a</td>
<td>!</td>
</tr>
<tr>
<td>2</td>
<td>b</td>
<td>@</td>
</tr>
<tr>
<td>3</td>
<td>c</td>
<td>$</td>
</tr>
<tr>
<td>4</td>
<td>d</td>
<td>%</td>
</tr>
<tr>
<td>5</td>
<td>e</td>
<td>&</td>
</tr>
<tr>
<td>6</td>
<td>f</td>
<td>*</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>
</body>
</html>
|
|
|
|
|
Hi,
I am able to create the scroll bars but my problem is the headers widths are differing with column widths. The header widths are decreasing where as the column widths are remaining same.
This problem is coming only in Mozilla browsers. But if I say overflow:auto for its properties its header widths are good, but header is becoming invisible when I scroll down.
Thanks,
Md Abdul Aleem.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
Hi,
It was working fine until I drag the vertical scroll bar down, but when I scroll it down again its header widths are changing.
As that part belongs to the following CSS, can you please suggest me what change should I do to make the headers freezed even if vertical scroll bar is dragged.
.HeaderFreez
{
position:relative ;
top:expression(this.offsetParent.scrollTop);
z-index: 10;
}
Thanks in advance,
Md Abdul Aleem.
Thanks & Regards,
Md. Abdul Aleem
NIIT technologies
|
|
|
|
|
can someone explain if i need to use all the three lines of code mentioned below to disable the cache in a page.actually if i am using only Response.CacheControl = "no-cache" then also page is working properly.then what is the use of another two line..and also is it a server side cache or client side?
Response.CacheControl = "no-cache"
Response.AddHeader("Pragma", "no-cache")
Response.Expires = -1
|
|
|
|
|
I think for client cache only Response.Expires will do. No need for those cache headers.
|
|
|
|