|
Hi If you think it completly wrong than definiely it is...I know that there will be no 0001 if we follow the above code. It's just for the hint not the complete code. Here in discussion I think we get a direction how we have to preceed and moreover the question itself was not clear.
|
|
|
|
|
Please be more specific and detailed
Cheers!!
Brij
|
|
|
|
|
int x = 1234
there you go.
or, if you prefer vb,
dim x as int = 1234
Bob
Ashfield Consultants Ltd
|
|
|
|
|
i have a button and in onclick i wrote this:
Context.Response.Redirect("~/Print.html?ProductName=salam");
i dont know how should i get the parameter ProductName in print.html.
can anybody help me? plz
|
|
|
|
|
You can the value of url by "window.location" then search the values from it.
Cheers!!
Brij
|
|
|
|
|
can you write a sample for me. thanks
|
|
|
|
|
you can use this javascript function
function querySt(ji)
{
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++)
{
ft = gy[i].split("=");
if (ft[0] == ji)
{
return ft[1];
}
}
}
in your case parameter "ji" would be "ProductName" and it will return "salam".
Actually if the URL more than parameter then also it'll work
Cheers!!
Brij
|
|
|
|
|
i wrote this:
<script type="text/javascript" >
function ontextchange(ji)
{
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++)
{
ft = gy[i].split("=");
if (ft[0] == ji)
{
document.getElementById("lblDesc").value =ft[0] ;
}
}
}
onload = ontextchange("ProductName");
</script>
lblDesc is my label but i can not see the value salam
do u know why?
|
|
|
|
|
for value,
use
document.getElementById("lblDesc").value =ft[1] ;
if doesn't work
use alert for ft[0] and ft[1] then check what it shows
Cheers!!
Brij
|
|
|
|
|
|
Hi Friends,
I am using webdatetimeedit of infragistics in my asp.net pplication . I am giving the editorcontrol id of infragistics ultraweb grid control . And the editor control id is the id of webdatetimeedit . But the control is always displaying in the bottom of the page . But in practically the control should not display in any occurance . So could you people help me out regarding this issue . Its pretty urgent .
With Best Regards
Santanu
|
|
|
|
|
patra.santanu@yahoo.co.in wrote: Its pretty urgent
No its not, otherwise you would contact infragistics - after all, its their control so they should be able to help you.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
HI ALL,
I am using the following code for Decrtption
public static string Decrypt(string xxxxx)
{
RijndaelManaged RijndaelCipher = new RijndaelManaged();
string Password = "srinu";
byte[] EncryptedData = Convert.FromBase64String(xxxxx);
byte[] Salt = Encoding.ASCII.GetBytes(Password.Length.ToString());
//Making of the key for decryption
PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(Password, Salt);
//Creates a symmetric Rijndael decryptor object.
ICryptoTransform Decryptor = RijndaelCipher.CreateDecryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream(EncryptedData);
//Defines the cryptographics stream for decryption.THe stream contains decrpted data
CryptoStream cryptoStream = new CryptoStream(memoryStream, Decryptor, CryptoStreamMode.Read);
byte[] PlainText = new byte[EncryptedData.Length];
int DecryptedCount = cryptoStream.Read(PlainText, 0, PlainText.Length);
memoryStream.Close();
cryptoStream.Close();
//Converting to string
string DecryptedData = Encoding.Unicode.GetString(PlainText, 0, DecryptedCount);
return DecryptedData;
}
It is showing me an error
"An exception of type 'System.FormatException' occurred in .DLL but was not handled in user code
Additional information: Invalid length for a Base-64 char array."
in the Line "byte[] EncryptedData = Convert.FromBase64String(xxxxx);"
Plz help me solve this ASAP.
|
|
|
|
|
Please don't post to multiple forums, its rude.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I'm going to just hazard a guess here and say that your input string is not the correct length for a base 64 encrypted string. Just a guess...
You might want to look at where that string is coming from...
|
|
|
|
|
You haven't provided enough information for anyone to give you a solution.
The error message says that the string is not a valid base64 string. Therefore the problem is not with the code that you are showing, but in the code where the string is created.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
I want to develop a page in asp.net in which when user type any word the list of corresponding words or list of words starting with that char should display in the drop down and user must able to select that.
for example Visual Studio when we type any word and press ctrl+space bar the list of words appears. i want to do the same.
|
|
|
|
|
you can do this by using ajax in you application. Whenever you enter a key it will fired and show the related record by calling the ajax function(ues like in database stored procedure).
|
|
|
|
|
Create a textbox, and tie it to a database. On the OnTextChanged event, load the values from the DB using the rowfilter.
|
|
|
|
|
Hi.
I'm usung the below code for generating an image (verification image).
It' OK localy, but when I publish it on server an error appears that says:
"A generic error occurred in GDI+."
code:
System.Drawing.Bitmap image = new System.Drawing.Bitmap(100, 20);
Graphics g = Graphics.FromImage(image);
try
{
Random random = new Random();
g.Clear(Color.WhiteSmoke);
Font font = new System.Drawing.Font("Arial", 14, System.Drawing.FontStyle.Bold);
g.DrawString(checkCode, font, new SolidBrush(Color.Gray), 23, 0);
image.Save(Server.MapPath("Images/" + Session["CheckCode"] + ".gif"), System.Drawing.Imaging.ImageFormat.Gif);
}
finally
{
g.Dispose();
image.Dispose();
}
Best wishes
|
|
|
|
|
Hi
I have the following code which is running on the page load:
ArrayList originalTrue = new ArrayList();
ArrayList originalFalse = new ArrayList();
for (int x = 0; x < GridView4.Rows.Count; x++)
{
GridViewRow row = GridView4.Rows[x];
bool isCheckedIgnore = ((CheckBox)row.FindControl("chkIgnore")).Checked;
string strID = GridView4.DataKeys[x].Values[0].ToString();
if (strID != null)
{
if (isCheckedIgnore == true)
{
originalTrue.Add(strID.ToString());
}
else
{
originalFalse.Add(strID.ToString());
}
}
}
ViewState["originalTrue"] = originalTrue;
ViewState["originalFalse"] = originalFalse;
The problem is when I go to the second page of the gridview it doesnt run.How can I get the code to run on the second page of the gridview?
thanks
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
If you have the code in a
if (!IsPostBack)
it will only run when the page loads and not each time there is a post back. Is this the case here?
|
|
|
|
|
Well it currently sits in a ispostback = false.
The problem is that the viewstate seems to keep the state of the page over the postback which I dont want to do.
I need to store the arraylist in some sort of session so that I can check it when the page of the gridview changes. This is because the values it is storing in the viewstate for the row id is then being used when the gridview page changes which obviously is no good.
How can I store the arraylist in a session so that it works over multiple pages in the gridview?
thanks
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
Fixed
The answers posted by me are suggestions only and cannot be used in anyway against me.
|
|
|
|
|
hi friends,
fine and hope u so..
i am trying to include checkbox in the datagrid...
this is my coding
CheckBox chkbox = new CheckBox();
TextBox txtbox= new TextBox();
foreach(DataGridItem item in DGSample.items )
{ chkbox=(CheckBox)item.FindControl("chkbox");
txtbox=(TextBox)item.FindControl("txtbox");
if(chkbox.Checked)
{ Response.Write(item.Cells[0].Text);
}
}
in this coding i am getting probs...in the for loop.....
initially i got error like this...
Error:'System.Web.UI.WebControls.GridView' does not contain a definition for 'items'
so ... i tried with
foreach(DataGridItem item in DGSample.rows )
even i am getting error like
Unable to cast object of type 'System.Web.UI.WebControls.GridViewRow' to type 'System.Web.UI.WebControls.DataGridItem'.
can u anyone help me to solve this prob???
|
|
|
|