|
anandhakrishnan wrote: Is it possible with .Net code.
Of course.
There's a Cryptography namespace in .NET, if it doesn't support this algorithm, then google for code, or google for the algorithm and write it yourself. Either way, it's obviously possible in .NET, it's just a question of how much work you need to do yourself.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I am Using Visual Studio 2008 for creating a Web Application. While Viewing the details from A Grid View .. I am Getting these errors "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source error: Line 17
Line 15: img = CType(e.CommandSource, ImageButton)
Line 16: gvRow = img.BindingContainer
Line 17: TimeSheetID = gvTimeHdr.DataKeys(gvRow.RowIndex)(0)
Line 18: Session.Add("sessionMode", "cmdView")
Line 19: Response.Redirect("TimeEntry.aspx?TimeSheetID=" & TimeSheetID & "")
Can Anyone give a solution and the reason Why this error is generating
Thanks,
Arunaruby
|
|
|
|
|
Wow. This stuff just frustrates me so much. Why are you trying to be a programmer, if you won't even read the error messages, or learn to use the debugger ?
The error means what it says. It means that one of the two indexes you're looking up, is bigger than the collection, or it's less than zero. Learn to use the debugger, and trace through your code, to work out what the values are, then in the long term, write code that actually checks it's assumptions.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Arunaruby wrote: Line 17: TimeSheetID = gvTimeHdr.DataKeys(gvRow.RowIndex)(0)
try to use e.RowIndex (or) check whether you have written the bind inside the postback
|
|
|
|
|
iam finding many examples in webparts using sql server..will any body give the example on how to implement the webparts personalisation using oracle as db
|
|
|
|
|
Where is the issue ? What UI components you use, and what DB you connect to, are surely two different things ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
I have to connect three gridview and on the selection of row in the grid view it shud jump to the second grid view and vice-versa......For this I have hidden field in the grid view which takes the unique "ID" value and passes it to the next page. in the next page i use it with the help of query string and Programitically create second Grid view data source.
For e.g. CATEGORY->SUBCATEGORY1 works fine
SUBCATEGORY1->SUBCATEGORY2 DOESNT WORK...
It gives me this error
Invalid postback or callback argument. Event validation is enabled using <pages enableeventvalidation="true"> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
|
|
|
|
|
disable the EnableEventValidation to false. I think this is the way to overcome from this error.
|
|
|
|
|
that i did....bt its still givning error
|
|
|
|
|
how did you bind your grid,could you post your code...
use postback to bind your grid
if (!IsPostBack)
{
//Bind grid with query string id
}
|
|
|
|
|
If Not IsPostBack Then
Dim id As Integer = Request.QueryString("id1")
Dim db As Database = DatabaseFactory.CreateDatabase("See2Buy")
Dim cmd As String = ("Select CategoryID, SubCat2 from Categories where CategoryID=" + id.ToString())
Dim rdr As IDataReader = db.ExecuteReader(CommandType.Text, cmd)
GridView1.DataSource = rdr
GridView1.DataBind()
End If
|
|
|
|
|
This is depressing on so many levels. No-one is paying for this code, right ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Disabling event validation is bad. Quoting MSDN[^],
It is strongly recommended that you do not disable event validation. If you do disable event validation, make sure that no postback could be constructed that could have an unintended effect on your application.
This validation examines the post data and ensure the values supplied are known. You probably will be modifying some values at client side and this error will occur. So I guess you need to rethink your design.
|
|
|
|
|
Hello, I'm developing a ASP.net web page that will be deployed in production as http://apps.mycompany.com/mypage.aspx. I have to include header SSI available through a URL - http://testserver/global/header.html.
If I use the INCLUDE directive with the VIRTUAL keyword, I'm not getting the intended result. I'd appreciate if somebody can help me with how I can include the header from this URL into my page. Thanks in advance!!
|
|
|
|
|
I am populating a drop down list from AD, which is working fine (The drop downlist is populated when I browse to the site.) The problem I am having is that when I later go to use that data with dropdownlist.SelectedItem.Text, nothing is returned. Any suggestions?
Dim Groups1 As New DirectorySearcher<br />
Dim GroupSearchRoot1 As New DirectoryEntry("LDAP://OU=SomeOU,OU=SomeOU,OU=SomeOU,DC=SomeDomain,DC=SomeTopLevelDomain")<br />
<br />
With Groups1<br />
<br />
.SearchRoot = GroupSearchRoot<br />
.Filter = "(&(ObjectClass=Group)(CN=SomeGroup))"<br />
End With<br />
<br />
Dim Members1 As Object = Groups1.FindOne.GetDirectoryEntry.Invoke("Members", Nothing)<br />
<br />
For Each Member As Object In CType(Members1, IEnumerable)<br />
Dim CurrentMember1 As New DirectoryEntry(Member)<br />
dropdownlist.Items.Add(CurrentMember1.Name.Remove(0, 3))<br />
<br />
Some code to sort the dropdownlist alphabetically...
|
|
|
|
|
This looks messy and complicated. I also don't see any code to stop it running every postback, or any indication where it runs. If you run this code in page load, it resets the data source, and thus will cause the selection to be lost.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
The site is simply a one page form with a submit button, basically a web form for employees to use for new user requests. On submit a specifically crafted email is sent to our ticketing system creating a ticket for the various IT groups involved in New User setups. The ticketing system sends an email to an "Authorized Manager" asking for approval for the request. The drop down list is a list of Authorized Managers.
Currently the site is in prod, with a hard coded list of Authorized Managers, I am trying to improve it by using AD Security groups so that I don't have to manually maintain the list.
Should I ditch the above code and try something else, or is there some way that I can salvage it? I am just a script monkey Sys Admin trying his hand at "actual" prgramming to improve process.
|
|
|
|
|
Sorry for the vague question but I have a DLL that is my UI package from another project, now before I start a new project I wish to know, is porting over vb.net custom controls to asp.net controls relatively easy and straightforward as I'm making it out to be, or is there some complexity that wouldn't be apparent to me.
|
|
|
|
|
EliottA wrote: is porting over vb.net custom controls to asp.net controls relatively easy and straightforward
I don't know what you mean by that. The question does not make any sense.
VB.NET is a language, that happens to use the .NET Framework, of which ASP.NET is a part.
Are you confusing the language with WinForms? (Another part of the .NET Framework concerned with windows forms applications)
|
|
|
|
|
Sorry again for the confusion, yes my UI library was made for Win Forms, and I wish to use the same control set in an asp.net project without rewriting all the controls, can this library be shared across win forms and asp.net projects or would that be an improper design?
|
|
|
|
|
You want to use some of your vb.Net winform controls to your asp.net project ?
|
|
|
|
|
Well yes.. just to keep the same look without rewriting every control used..
I take it I'm walking down the wrong path here?
|
|
|
|
|
Yes.
Think about it a little. They are two separate environments that require separate types of rendering, and thus coding. An ASP.NET control can be written as a collection of html tags which wouldn't render on a WinForm. Likewise, a WinForm control could be written to make use advanced GDI+ methods that would not be able to be rendered in the browser.
only two letters away from being an asset
|
|
|
|
|
There is a requirement in my page to store the bytearray temporarily in some way and later use the same for insertion.
There is a fileupload functionality in my page and the bytearray stores the filesize. Since I need to insert the filesize into database only after some conditions met, I need to store this temporarily. Can anybody please help me regarding this?
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|