|
I have the following table:
<asp:Table runat="server">
<asp:TableRow ID="headerROW">
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="contentROW">
<asp:TableCell></asp:TableCell>
</asp:TableRow>
<asp:TableRow ID="footerROW">
<asp:TableCell></asp:TableCell>
</asp:TableRow>
</asp:Table>
I want to know how can bring the footerRow to the absolute bottom of the page when the contentROW is less than the page height?
|
|
|
|
|
how to diplay data into a gridview on selecting a value from a dropdownlist.the dropdownlist has set of values.when i select one value,the details based on that value should be displayed in a dropdownlist
M.Sravani
|
|
|
|
|
I am not sure what you expect from such a vague description of your problem. When the index selected changes for your dropdownlist, get the values from where ever you are storing them and then display them in the grid.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
sorry.i got the answer.thank you
|
|
|
|
|
Aoa friendz,i am a beginner in Asp.net.i have been given a task that is how to extrack an image from an email and save it on a disk.so intially help me how to start..how to send an image to an email account in asp.net.i have to use google server i-e my gmail account.
|
|
|
|
|
|
I have a question about what is the best way of setting up session variable(s) in the following situation for a change I am making to a C# web form application.
Currently when the users enter a specfic transaction code that = '123', a property of a textbox is set to visible and the user can enter a comment that is up to 20 characters long. Now the user want to be able to enter a comment that can be up to 15,000 characters.
To accomodate this request, I am going to make a change where the user will be pointed to a new web form page where the user can enter the information. Once the user has entered the information, they will click the save button and will be taken back to the orginal screen they started on.
**Note: A new web form page is going to be generated since there is not enough room on the orginal page to enter the information.
When the user clicks the 'save' button and return to the original web page, I am not going to update the database at that time. I want to pass the transaction id (unique identifier) and the new text field that is up to 15,000 characters back to the original web page as session variable(s). Once the user is on the original web page, I will take the session variable that is up to 15,000 characters and update the database in the same manner the database is currently updated.
Thus can you tell me if using session variables in the case listed abover is a good idea? Why or why not?
Also if there is a better way to accomplish this goal, can you tell me what the better method would be?
|
|
|
|
|
Displaying a new web page just to get an additional field may hinder the user experience. I would suggest that start looking for alternatives like AJAX popups or jQuery popups that dynamically show popups in the same page using visual effects rather than opening new pages. Sharing a field withing the same page is also much easier compared to sharing it between two pages.
|
|
|
|
|
Hi,
I have an asp.net WCF Service, my client application is going to send me excel file as byte array. I have to read those bytes and upload data in the database.
Microsoft Jet, or Ace drivers take the excel file name, is there any way that I can read those excel file bytes directly without storing the file in my file system.
Thanks in advance.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
|
|
|
|
|
you make a byte() array for the source, and then copy it to a memorysteam if needed, or just pass the byte array to the destination.
Something like this, I don't something to test it on now
Dim excelFile As byte() = {input}
ByVal excelFile() As Byte
If you need a primitive, that's different.
credit to
[vinz^]
Dim arr As New ArrayList()
arr.Add("AAA")
arr.Add("BBB")
arr.Add("CCC")
Dim byteArray As Byte() = New Byte(2) {}
For i As Integer = 0 To arr.Count - 1
byteArray = DirectCast(arr(i), Byte())
Next
'Read byteArray to stream
Dim stream As New System.IO.MemoryStream(byteArray)
|
|
|
|
|
Hi,
Here I am at the destination side, so I receive excel in byte array format. Then I want to read that array similar to the way we read from excel file using jet or ace drivers.
Is there any way that I can read from a byte array (the byte array created by excel file and I should be able to read the data as if I am reading from an excel file (like row wise and column wise)), actually I am reading from byte array or memorystream created by byte array.
I am able to create memory stream from byte array, but I am unable to read as if I am reading from excel. One more important thing, I dont want to save my file on to the file system, if I save on to file system, I am able to read using oledb jet or ace drivers, but I dont want to save on to the file system.
Is there any way to do that?
I have to update in the database that part I will take care.
Thanks & Regards,
Abdul Aleem Mohammad
St Louis MO - USA
modified 10-Aug-12 19:48pm.
|
|
|
|
|
I thought you just wanted to store the file. Yes You can do that, but i don't how.
Guess you cross that road when you get to it. if your able to store the byte array.
With all do respect, meaning something else
I find it hard to believe that your selling services that you have no clue how to do.
I don't mind helping you, but eventually you need to give something back to CJ, like answer some questions for other OPs, and not be a pure consumer
This reads the dimensions of a flash file from a pure byte stream, just an in insight into what you wish to achieve. I have no interest in reading a excel file, so I'm stopping here at this point. When you ready to ready bytes and translate them into bits, let me know.
Private Function getDimensions(ByVal stream As Stream) As Rectangle
Dim inputStream As Stream = Nothing
Dim signature() As Byte = New Byte(8) {}
Dim rect() As Byte = New Byte(8) {}
stream.Read(signature, 0, 8)
If (System.Text.Encoding.ASCII.GetString(signature, 0, 3) = "CWS") Then
inputStream = New InflaterInputStream(stream)
Else
inputStream = stream
End If
inputStream.Read(rect, 0, 8)
Dim nbits As Integer = rect(0) >> 3
rect(0) = Convert.ToByte(rect(0) And &H7)
Dim bits As String = ByteArrayToBitString(rect)
bits = bits.Remove(0, 5)
Dim dims() As Integer = New Integer(4) {}
For i As Integer = 0 To 3
Dim dest() As Char = New Char(nbits) {}
bits.CopyTo(0, dest, 0, If(bits.Length > nbits, nbits, bits.Length))
bits = bits.Remove(0, If(bits.Length > nbits, nbits, bits.Length))
dims(i) = BitStringToInteger(New String(dest)) / 20
Next
Return New Rectangle(0, 0, dims(1) - dims(0), dims(3) - dims(2))
End Function
Private Function BitStringToInteger(ByVal bits As String) As Integer
Dim converted As Integer = 0
For i As Integer = 0 To bits.Length - 2
converted = (converted << 1) + If(bits(i) = "1", 1, 0)
Next
Return converted
End Function
Private Function ByteArrayToBitString(ByVal byteArray() As Byte) As String
Dim newByteArray() As Byte = New Byte(byteArray.Length) {}
Array.Copy(byteArray, newByteArray, byteArray.Length)
Dim converted As String = ""
For i As Integer = 0 To newByteArray.Length - 1
For j As Integer = 0 To 7
converted += If((newByteArray(i) And &H80) > 0, "1", "0")
newByteArray(i) <<= 1
Next
Next
Return converted
End Function
|
|
|
|
|
I am getting Input string was not in a correct format with the following code:
sql_connection = new MySqlConnection(ConfigurationManager.ConnectionStrings["SQLdb"].ConnectionString);
sql_connection.Open();
sql_command = new MySqlCommand("sp_check_if_member_exist", sql_connection);
sql_command.CommandType = CommandType.StoredProcedure;
sql_command.Parameters.AddWithValue("param_member_id", MySqlDbType.Int32).Value = Convert.ToInt32(Request.QueryString["id"]);
sql_command.Parameters.AddWithValue("param_member_guid", MySqlDbType.VarChar).Value = Convert.ToString(Request.QueryString["guid"]);
sql_command.Parameters.Add("param_is_exist", MySqlDbType.Bit).Direction = ParameterDirection.Output;
sql_reader = sql_command.ExecuteReader();
sql_reader.Read();
if (sql_reader.HasRows)
{
if (Convert.ToBoolean(sql_command.Parameters["param_is_exist"].Value) == true)
{
panelMessage.Visible = false;
panelActivation.Visible = true;
}
else
{
panelActivation.Visible = false;
lblMessage.Text = "Error activating your membership!";
panelMessage.Visible = true;
return;
}
The error occurs on this line:
sql_reader = sql_command.ExecuteReader();
where is my mistake?
|
|
|
|
|
There are three suggestion and I think it supposed to be one of them:
1. Check you are entering correct store procedure name
2. Check you are entering correct parameters names
2. Check you are entering correct parameters values
Meysam
|
|
|
|
|
check d database.... used text field values are should not be empty..........
|
|
|
|
|
SqlCommand.Parameters.AddWithValue() does not take datatype as an parameter. You should add the parameter name and value (not datatype)
sql_command.Parameters.AddWithValue("param_member_id", Request.QueryString["id"]);
http://derekreynolds.wordpress.com/2011/05/16/using-sqlcommand-and-addwithvalue-parameters-to-execute-sql-insert/[^]
But your error "Input string was not in a correct format" is because some convert's did not succeed. When converting strings-->int etc you should use TryParse
private static void TryToParse(string value)
{
int number;
bool result = Int32.TryParse(value, out number);
if (result)
{
Console.WriteLine("Converted '{0}' to {1}.", value, number);
}
else
{
if (value == null) value = "";
Console.WriteLine("Attempted conversion of '{0}' failed.", value);
}
}
--------------------
When Chuck Norris' dreams come true, your worst nightmares begin.
|
|
|
|
|
why converting problem?
I only have two paramaters:
param_member_id which is int and it's int in MySQL.
param_member_guid which is varchar and it's varchar in MySQL
here is my values when getting error:
id=66&guid=9abc9f1e-e2f3-11e1-b39f-00ffceb1d3b5}
|
|
|
|
|
|
I think I have already answered this question in a different forum. Anyway, here is your problem
In this line:
sql_command.Parameters.AddWithValue("param_member_id", MySqlDbType.Int32).Value = Convert.ToInt32(Request.QueryString["id"]);
and the next two lines, you're actually passing Data Types (MySqlDbType.Int32) instead of the actual value. The AddWithValue() method expects the actual value rather than the data type. So do something like :
sql_command.Parameters.AddWithValue("param_member_id", Convert.ToInt32(Request.QueryString["id"]));
|
|
|
|
|
i am in project of mlm,and i am not knowing the idea how to give the commission for every registered user and to his parent and sub parents too
|
|
|
|
|
1. MLM = ripoff and in some places illegal.
2. It's simple basic math.
3. You have provided no information that anyone could use to help you. But then see #1.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
modified 10-Aug-12 11:13am.
|
|
|
|
|
Hi all, I am relatively new to Caching application block, so my problem can be very trivial. But I don't get it.
So there is this complex application (in production enviroment) that I have rewritten to use cache.
my framework is not so easy to describe, however: every service class (in the logic tier) has a father class that define the cache (static, so application wide)
SmallObjectCache = EnterpriseLibraryContainer.Current.GetInstance<ICacheManager>("SmallObjectCache");
I have written some classes to manage my cache: I use for single objects and for list of object (Read operation and GetAll operation)
protected virtual void CacheAddData(DomainObject domainObject)
{
if (domainObject != null)
{
CacheDictionary[this.GetType().FullName].Add(this.GetType().FullName + "_" + domainObject.GetId(), domainObject);
List<DomainObject> cachedObj = CacheGetAllData();
if (cachedObj != null && cachedObj.Count > 0)
{
int idx = -1;
try
{
idx = cachedObj.FindIndex(a => a.GetId() == domainObject.GetId());
cachedObj.RemoveAll(a => a.GetId() == domainObject.GetId());
}
catch (NullReferenceException)
{
BusinessFacade.ApplicationLogger.Write("INFO: Cache: Linq exception", Category.General, Priority.Normal, 1, System.Diagnostics.TraceEventType.Information);
}
if (idx >= 0)
cachedObj.Insert(idx, domainObject);
else
cachedObj.Add(domainObject);
CacheAddAllData(cachedObj);
}
}
}
So what the above do is to add an item in cache and if exist a list of that objects retrive it and add/insert in the right position the item.
Now the bug:
Everything is running fine. 100+ people use the system without a glitch. BUT sometime, near middle of the day, one or two people report a nullreference exception, especially in this code:
List<Utente> decoratori = GetAll().Cast<Utente>().ToList().Where<Utente>(u => u.Ruolo.IsDecoratore()).ToList();
the where iterator crash stating that object is null (I do checks before the only null objects can be the "Ruolo")
Now this is the issue: the same user with everyting unchanged became without an attribute (non deterministic).
Recycling the IIS memory fix the issue (so is not a reproducible issue).
I can't debug the issue because on my develop machine I have not this issue, bu I am one user and do same stuff.
BTW the application call garbage collection explicity very often , I don't know if this can be an issue.
I am becaming crazy (users complain a lot, as you can imagine...)
|
|
|
|
|
The thing about a cache is that you can't guarantee that it still holds data. A typical pattern with a cache is to attempt to retrieve an item from the cache, and if nothing is returned, the cache is refreshed with the data and then the item is returned.
It sounds as though this is your issue. Basically, something you are trying to retrieve is no longer present in the cache, so you recycle IIS which causes you to repopulate the cache because you go through your normal start up processes.
The only thing you can do to fix this is to add the functionality to check and reload the items.
|
|
|
|
|
I had a problem like that but with xml reading and writing. As more bots crawled the site, at a very fast pace, my program would crash, because the file was still open.
I had to really fine tune the program about 10 times, with more verification, and to open, read and close as fast as possible, then work in memory only, when done open write and close, then dump the memory and cleanup.
I know it's not the same problem, but in principal, the code had to be as efficient as possible.
|
|
|
|
|
In a C# 2010 web appplication, I would like to be able to debug javascript when I need to. I have not been able to accomplish this task so far. I have changed internet explorer to allow debugging.
I also want to mention in the web.config file I have the debug option set and I have the configuration manager set to cofmpile in debug mode.
Is there something in the visual studio.net 2010 ide that I need to set so I can see all the .net code? Not just the code I generated. If so, what option would I use?
modified 10-Aug-12 0:52am.
|
|
|
|
|