|
sorry! can you be a bit elaborative about the problem. I just confused.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
I have a gridview control and a formview control in a loginview control when I send a link to this page with ?Code={0}
the page does not load with the required code how can I make it work in the page_load event?
BiG RaLpH
|
|
|
|
|
?Code=0
In the page_load event handler
if (Request.QueryString.Count>0) // it is always better to perform conditional operation on querystring before retrieving values.
{
if (Request.QueryString["Code"]!=null)
{
// place code that has to execute.
}
}
Hope this will solve your problem.
Happy programming.
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
this function is working fine when I click a button but if I put it in the page load it doesn't.
On Error Resume Next
gv4 = LoginView1.FindControl("GridView4")
gv5 = LoginView1.FindControl("GridView5")
lbl5 = LoginView1.FindControl("Label5")
txtSe = LoginView1.FindControl("txtSearch")
Dim fv1 As FormView
fv1 = LoginView1.FindControl("FormView1")
If LoginView1.FindControl("GridView4").ToString = True Then
i = 0
For i = 0 To gv4.Rows.Count - 1
If gv4.Rows(i).Cells(0).Text.StartsWith(gv5.Rows(0).Cells(0).Text) Then
gv4.SelectedIndex = i
fv1.PageIndex = gv4.SelectedIndex
Exit For
End If
Next
sIndex = gv4.SelectedIndex
lbl5.Text = gv4.SelectedIndex
End If
BiG RaLpH
|
|
|
|
|
Hi All,
I am using C#.2005. I created a resource file in business layer to store messages for users. As per you know, visual studio automatically created a class for this resource file and properties for each string. So I can access each string by typing [class name].[property name]. The problem is that these properties are declared with the keyword 'internal'. So I can access it only in the business layer. To access these properties in presentation layer, I changed the scope to public. Now I can access the properties also from presentation layer. But there is hundreds of string in this resource file. So it is difficult to modify each property. How can I overcome this problem? Please help me.
Thanks & Regards,
Hogan
|
|
|
|
|
Sounds like the class belongs in the presentation layer, seeing as it consists of rendering details.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sorry I didn't get you. Can you please explain it little bit more?
Thanks
Hogan
|
|
|
|
|
Not sure how to explain it better - your strings are shown in the presentation layer, so that's probably where your resource files belong. Not in the business layer.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
No sir. I want to use it in both layer. That's why I created it in BL.
For example I created functions to send mail to users. These functions are written in the BL. The mail body is declared in this resource file. So I want to access it in BL.
Thanks to spend time with me
Hogan
|
|
|
|
|
oh I can pass it as parameters. Sorry to waste your time for these silly questions. But I am curious, is there any way to access resource files in different assemblies?
Thanks and Regards,
Hogan
|
|
|
|
|
Hi all,
Can anyone tell me a regular expression to validate a decimal(18,2).
Thanks
Bye
|
|
|
|
|
\d{1,18}\.?\d{0,2}
At a guess.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$
This regular expression will match on a real / decimal / floating point / numeric string with no more than 2 digits past the decimal. The negative sign (-) is allowed. No leading zeroes or commas
or use the following link: http://regexlib.com for further search
|
|
|
|
|
Will it be restricting the value to maximum 16 digits before decimal?
-- modified at 5:16 Monday 22nd October, 2007
Bye
|
|
|
|
|
the previous one will not... try this one :
^[-]?([1-9]{1,18}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$
|
|
|
|
|
"\d{0,18}\.?\d{0,2}"
Best Regards,
Chetan Patel
|
|
|
|
|
Try this. I think this is exact one
"\d{0,16}(\.\d{1,2})?"
Best Regards
|
|
|
|
|
How can i Open File Dialog without html file field. By clicking on a server button i need to Open File Dialog from server side coding.
Thks
|
|
|
|
|
try using the following code:
if (file.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/pdf";
Response.WriteFile(file.FullName);
Response.Flush();
Response.End();
Response.Close();
}
Incase the content type has been defined for word doc or xls file, the file dialog box will open itself.
Hope this is of some help !
|
|
|
|
|
i mean not to open file.. i want to open Open File Dialog box for choosing a file to upload from the local system , without using file field control
|
|
|
|
|
I hope follwing code is sufficient for you.
I open a new page but closes the window and only dialog box appears.
onload= function(){
file1= document.getElementById("file1");
file1.click();
window.close();
}
Intelligence is measured by common sense not by how many scholarly books you read.
|
|
|
|
|
I am having the master page and a aspx page(of type master property).Now the question is which form load will execute first master page form load or the master page aspx type
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
|
Why don't you try it out yourself? Put a Response.Write in each method, and see which ends up first in the generated code.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
I think master page load will execute first...But this think u can check practically...
Regards
Aavesh
|
|
|
|