|
I am trying to setup custom paging for a formview. I can get < << >> > to show up and no matter how I set any properties, despite being in "numeric" mode, the link buttons still show up the same way. This shouldn't be this difficult but is proving to be that way. What I am wanting to do is to basically modify the default setting for a FormView's paging display. I need to have Page #: in front of the page #'s like Page #: 1 2 3 4. Does anyone know how to do this?
|
|
|
|
|
Does anyone have any ideas?
|
|
|
|
|
I am in need of an asp.net programmer to help with a dedicated Microsoft server running mssql and Windows server.
I would like to know where the best place is to find a really cool, affordable and customer-oriented person???
|
|
|
|
|
borntodeal wrote: where the best place is to find a really cool,
All the cool developers are here Just not in this forum. I thought there was a jobs forum, though I don't see it at the moment.
only two letters away from being an asset
|
|
|
|
|
you found one
|
|
|
|
|
Hello- Please help me with the following questions, if possible,
please also provide some explanations--thanks in advance:
1) Assuming that "valid connection string" is a valid connection string, what will be the output of the following code? If the code cannot compile, please state why.
the same rules apply to this question as for the one above
using(SqlConnection sqlConn = new SqlConnection("valid Connection string"))
{
System.Diagnostics.Debug.WriteLine("Opening a connection");
sqlConn.Open();
System.Diagnostics.Debug.WriteLine("Connection Opened");
sqlConn.Close();
System.Diagnostics.Debug.WriteLine("Connection Closed");
}
if(sqlConn == null)
System.Diagnostics.Debug.WriteLine("Connection State is NULL");
else
System.Diagnostics.Debug.WriteLine("Connection State:" + sqlConn.ConnectionState);
2)The following code needs to generate a string of 1000 alternating '+' and '-' characters
Rewrite this code to make it more efficient (Note: You can use different data types than the ones present)
string htmlOutput = string.Empty;
for(int itemIndex = 0; itemIndex < 1000; itemIndex++)
{
if( itemIndex % 2 == 0)
htmlOutput += "+";
else
htmlOutput += "-";
}
3)Assuming that CustomException is defined, what will be the output of the following code?
try
{
throw new CustomException("Something went wrong");
}
catch(Exception ex)
{
System.Diagnostics.Debug.WriteLine("Generic Exception has been triggered");
}
catch(CustomException ex)
{
System.Diagnostics.Debug.WriteLine("Custom Exception has been triggered");
}
4) What will be the difference in behavior between the lines marked 'a' and 'b' during runtime? (Assume that CustomClass is a defined class)
object objClass = new object();
CustomClass myClass1 = objClass as CustomClass; //a
CustomClass myClass2 = (CustomClass)objClass; //b
5) Assuming you have the following class:
public class MyClass
{
public MyClass()
{
}
public string DoNothing(string someParameter)
{
System.Diagnostics.Debug.WriteLine(someParameter);
}
}
How would you call the DoNothing function asynchronously and provide a callback?
6) What is the difference between a Monitor and a Semaphore?
7) Architectural Question: If you have pages that perform heavy DB or File I/O, what could be done to help increase the overall performance of the application? (Asp.net only! Assume all non asp.net factors have been optimized to the max)
8) What is the difference between the following 2 statements?
try
{
throw new ApplicationException("None");
}
catch(Exception ex)
{
throw ex;
}
try
{
throw new ApplicationException("None");
}
catch(Exception ex)
{
throw;}
9) What is the difference between a List and a LinkedList?
10) Assume that you retrieve a list of 1,000,000 Person objects from a database that contain the SocialSecurityID, First and Last name properties. Which collection class would you use to store and allow for quick lookup of Person objects based on the SocialSecurityID field?
A.Asif
A.Asif
|
|
|
|
|
Job search questions or class assignment?
only two letters away from being an asset
|
|
|
|
|
If someone answers these, how will that help you ? You'll get a job you don't deserver and will lose, or you'll move up a level in a course that you're currently incapable of doing, and you'll only be more stuck with the next assignment.
Do your own homework, or look for a different career.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
What on earth posesses you to think that we should do your test for you?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
The forum is intended for troubleshooting assistance and not to supplant regular homework. Read the forum guidelines here http://www.codeproject.com/kb/scrapbook/forumguidelines.aspx[^]
Posting questions of this level of stupidity just makes you look like a rude jackass.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi
How would i put a string value where the number 5 is?
if (dtlogtime.AddMinutes(5) < DateTime.Now)
tried searching couldn't find anything
thanks!!
|
|
|
|
|
if (dtlogtime.AddMinutes(Convert.ToInt32(stringValue)) < DateTime.Now)
|
|
|
|
|
Hu
I have the following code
How can I put this as a hyperlink i.e. <ahref etc<br="" mode="hold">
I dont want a button showing just a bit of text as the hyperlink
thanks
|
|
|
|
|
<asp:hyperlink navigateurl="~/.aspx" visible="false" id="hlrefresh" runat="server" text="Refresh" onclick="javascript:location.reload()">Refresh
|
|
|
|
|
You don't need to create server control just to call a client-side method.
<input onclick="javascript:location.reload();" type="button" title="Reset" />
only two letters away from being an asset
|
|
|
|
|
i think you can do that in plain HTML
Refresh
<a onclick="location.reload();" href="#" title="Refresh">Refresh</a>
Regards
|
|
|
|
|
i wanted to control it throguh the c# though i.e. make it invisible
|
|
|
|
|
Hi all,
I am using asp.net2.0 , C#.
I would like to know which is the best approach(faster ) to fill dopdownlist
1. making stored procedure and filling data to dropdownlist using datareader
2. passing query and filling data to dropdownlist using datareader
As I am facing problem of slowness of filling data . if you find any better approach or faster approach please guide me. database is not much heavy
Method I used to fill dropdownlist is
<br />
public void FillctrlList2(DropDownList ctrl, string procedurename,string fieldtext ,string fieldvalue , string conn, SqlCommand cmd, int i)<br />
{<br />
<br />
try<br />
{<br />
if (con == null)<br />
{<br />
this.openconnection(conn);<br />
this.con.Open();
<br />
}<br />
if (con.State == ConnectionState.Closed)<br />
{<br />
this.openconnection(conn);<br />
con.Open();<br />
}<br />
ctrl.Items.Clear();<br />
ctrl.Items.Add(new ListItem("Select One", "0" ));<br />
cmd.Connection = con;<br />
cmd.CommandText = procedurename;<br />
cmd.CommandType = CommandType.StoredProcedure;<br />
<br />
rdr = cmd.ExecuteReader();<br />
<br />
ctrl.DataSource = rdr;<br />
ctrl.DataTextField = fieldtext;<br />
ctrl.DataValueField = fieldvalue;<br />
ctrl.DataBind();<br />
<br />
rdr.Close(); <br />
}<br />
catch (Exception ex)<br />
{<br />
throw ex;<br />
<br />
}<br />
}<br />
<br />
regards
imran khan
|
|
|
|
|
There is nothing in that code that would make it slow in any way.
You might make it slightly faster if you loop through the data reader youself instead of using data binding, but not enough to make it noticable unless you are putting thousands of items in the dropdown.
If you really have that many items in a dropdown list, the problem is not the performance of the code, but that you have to rethink your user interface.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: You might make it slightly faster if you loop through the data reader youself instead of using data binding,
Databinding uses the IEnumerator interface to iterate through each item. When we loop through the DataReader , I guess the same thing is happening. So how this can boost the performance ? Please correct me.
|
|
|
|
|
The data binding adds a bit of overhead because it can use many different kinds of data sources. You can improve on this slightly as you can write code specificly for the data source and for the data that it contains.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
catch (Exception ex)
{
throw ex;
}
Please change that portion to:
catch (Exception ex)
{
throw;
}
By doing it your way, you lose the stack trace and it can be harder to debug future problems. And maybe you actually want to do something in that catch other than rethrowing the error? If not, what's the point of catching it in the first place?
I know this doesn't have anything to do with your problem as I don't see anything wrong with your databinding. So unless you're binding a large set of data like Guffa mentioned, this should work fine.
|
|
|
|
|
Using ASP.Net site manageer in VS 2005, membership is integrated into the SQLServer db, not the Express one.
I have the main folder set to allow all users, to allow default.aspx to show.
Then I have subfolders set to deny all users.
Then I have those subfolders allow a role.
On the default.aspx screen I show Loginview indicating your login status.
Project is published to server.
On local machine, rules work. User clicks on link, demands login for page access.
On server rules are ignored, goes right to page.
Any ideas where to look for the problem?
ps. In the site admin tool, I created a user, then checked the db on the server. It is there, so I'm not editing a local db.
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain..."
|
|
|
|
|
Let me know how to hide the "__do javascript postback" in the bottom of the browser.
it occurs when the user clicks link button or button control and so on
Gopinath.R
|
|
|
|
|
what do you mean hide it? what in the code or the actual button?
|
|
|
|